当前位置: 首页>>代码示例>>Python>>正文


Python Service.mimeGetProtocol方法代码示例

本文整理汇总了Python中service.Service.mimeGetProtocol方法的典型用法代码示例。如果您正苦于以下问题:Python Service.mimeGetProtocol方法的具体用法?Python Service.mimeGetProtocol怎么用?Python Service.mimeGetProtocol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在service.Service的用法示例。


在下文中一共展示了Service.mimeGetProtocol方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: cmsGetProtocolInfo

# 需要导入模块: from service import Service [as 别名]
# 或者: from service.Service import mimeGetProtocol [as 别名]
	def cmsGetProtocolInfo(event):
		if not event:
			return False

		respText = ''

		index = 0
		for mimeType in mimeTypeList:
			respText = respText + Service.mimeGetProtocol(mimeType)
			index = index + 1
			if index != len(mimeTypeList):
				respText = respText + ","

		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_SOURCE, respText)
		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_SINK, '')

		return event['status']
开发者ID:durandj,项目名称:OneServer,代码行数:19,代码来源:cms.py

示例2: cmsGetCurrentConnectionInfo

# 需要导入模块: from service import Service [as 别名]
# 或者: from service.Service import mimeGetProtocol [as 别名]
	def cmsGetCurrentConnectionInfo(event):
		if not event:
			return False

		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_CONNECTION_ID, CMSService.SERVICE_CMS_DEFAULT_CON_ID)
		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_RCS_ID, CMSService.SERVICE_CMS_UNKNOWN_ID)
		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_TRANSPORT_ID, CMSService.SERVICE_CMS_UNKNOWN_ID)

		for i in range(len(mimeTypeList)):
			mimeType = mimeTypeList[i]

			protocol = Service.mimeGetProtocol(mimeType)
			Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_PROT_INFO, protocol)

		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_PEER_CON_MANAGER, '')
		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_PEER_CON_ID, CMSService.SERVICE_CMS_UNKNOWN_ID)

		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_DIRECTION, CMSService.SERVICE_CMS_OUTPUT)
		Service.upnpAddResponse(event, CMSService.SERVICE_CMS_ARG_STATUS, CMSService.SERVICE_CMS_STATUS_OK)

		return event['status']
开发者ID:durandj,项目名称:OneServer,代码行数:23,代码来源:cms.py


注:本文中的service.Service.mimeGetProtocol方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。