MirrorLink(三 UPNP)- Application Server Service

一、UPnP Application Server Service

1、Service Type

urn:schemas-upnp-org:service:TmApplicationServer:1

2、State Variables

(1)AppStatusUpdate:是一个以逗号作为分隔符的appIDs(status发生变化的)的队列,appIDs参考TmApplicationServer 第一次event上来的的applist,每个appID都是A_ARG_TYPE_AppID类型。

例如:<AppStatusUpdate>0x5,0x1,0x4,0x3,0x7,0x2,0x6</AppStatusUpdate>

(2)AppListUpdate:是一个以逗号作为分隔符的appIDs(entries发生变化的)的队列,每个appID都是A_ARG_TYPE_AppID类型。

例如:<AppListUpdate>0x5,0x1,0x4,0x3,0x7,0x2,0x6</AppListUpdate>

(3)A_ARG_TYPE_AppStatus:这个变量是用xml格式表示的。表示的是某个特定的应用或者所有应用的status,这些应用都是可以被远程控制的。

(4)A_ARG_TYPE_AppID:32bit的unsigned int类型(16进制,以0x开头)

     0x45ab and 0x45AB (case insensitivity of the hexadecimal numbers) 
 0x45ab and 0X45ab (case insensitivity of the 0x) 
 0x00001234 and 0x001234 (leading zeros do not matter)

(5)A_ARG_TYPE_ProfileID:大约等于0的unsigned int

(6)A_ARG_TYPE_AppList:这个变量是用xml格式表示的。表示所有应用的列表

每个application用到的protocol如下:

(7)A_ARG_TYPE_URI:格式如下:

各个application的url组成:

(8) A_ARG_TYPE_String :sting类型
(9) A_ARG_TYPE_Bool :bool类型,false或者true
(10) A_ARG_TYPE_INT :unsigned int
(11) A_ARG_TYPE_AppCertificateInfo:这个变量是用xml格式表示的,结构如下:

UUID格式如下:

UUID = 4 * <hexOctet> “-” 2 * <hexOctet> “-” 2 * <hexOctet> “-” 2 * <hexOctet> “-” 6 * <hexOctet> 
hexOctet = <hexDigit> <hexDigit> 
hexDigit = “0”|“1”|“2”|“3”|“4”|“5”|“6”|“7”|“8”|“9”| “a”|“b”|“c”|“d”|“e”|“f”|“A”|“B”|“C”|“D”|“E”|“F”

例如:“uuid:2fac1234-31f8-11b4-a222-08002b34c003”

3、event,application service需要订阅的event如下图所示:

二、Action

1、GetApplicationList:这个action可以获取到一个application列表,这里面的application都可以远程开启和关闭

参数:

         AppListingFilter:这是一个过滤器,具体使用方法看文档,一般写"*"或者""表示获取所有的application及其属性

         ProfileID:这个是TmClientProfile service获取到的,如果TmClientProfile service没有设置,则为0

返回值:AppListing:返回一个applications的列表,这些 applications可以被远程控制和访问(可以用LaunchApplication, TerminateApplication and GetApplicationStatus actions控制)

2、LaunchApplication:用来远程启动一个程序。即使没有再UI上的程序也可以启动,如果某个程序使用相同profileID,调用LaunchApplication则会让此程序变为前台执行并或者UI控制权。

参数:AppID:GetApplicationList中获取到的中的某个AppID

ProfileID:这个是TmClientProfile service获取到的,如果TmClientProfile service没有设置,则为0

返回值:AppURI:一个对应protocol ID的url,protocol ID对应的是GetApplicationList action返回值里面的<remotingInfo>中的

例如:

<remotingInfo>
            <protocolID>RTP</protocolID>
            <format>98</format>
            <direction>in</direction>
            <audioIPL>4800</audioIPL>
            <audioMPL>9600</audioMPL>
</remotingInfo>

3、TerminateApplication:这个action可以使client远程关闭AppList的应用。即使这个app不是用LaunchApplication action启动的,也可以关闭。这个action有一个参数是profileID,指的是关闭实现了这个profile的实例,如果不是用LaunchApplication,启动的则profileID设置为0

参数:AppID:GetApplicationList中获取到的中的某个AppID

ProfileID:这个是TmClientProfile service获取到的,如果TmClientProfile service没有设置,则为0

返回值:TerminationResult:关闭成功为true,关闭失败为false

例如:

<TerminationResult>true</TerminationResult>

4、GetApplicationStatus:根据AppID获取对应application的status,如果AppID设置为"*",则返回所有application的status

参数:AppID,如果为"*"则返回所有application的status

返回值:AppStatus

5、GetApplicationCertificateInfo:获取一个application的证书数据

注意:AppID没说可以用"*"

6、GetCertifiedApplicationsList:Get a list of certified applications, matching a set of criteria

参数:AppCertFilter:具体看手册,一般用"*",表示不过滤

ProfileID:跟上面其他action的一样

返回值:CertifiedAppList:一个以逗号为分隔符的appIDs的列表

<AppID>0x5</AppID>

7、GetAppCertificationStatus:Return the certification status of a given application, under the provided properties

参数:AppID:某个application

AppCertFilter:一般用"*"

ProfileID:

返回值:AppCertified:返回认证的状态,认证为true,未认证为false

三、关于个数据类型的Example查看文档后续解释

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值