龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VC开发 >

微软实时通信API多客户端通信实战(2)[图](4)

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
请注意 pPresence->EnablePresence() 函数的第二个参数,它需要一个 Variant 型的存储区来保留好友列表以及允许和禁止的观察程序列表。Variant 存储区可采用
  请注意 pPresence->EnablePresence() &&函数的第二个参数,它需要一个 Variant 型的存储区来保留好友列表以及允许和禁止的观察程序列表。Variant 存储区可采用文件名 (BSTR)、DOMDocument 对象,或者支持 Istream、IsequentialStream 或 IpersistStream 的任意对象的形式。

  在 RTC 服务器中注册后,应用程序接收 RTCE_REGISTRATION_STATE_CHANGE &&事件,指示注册是完成还是失败。

  出席信息服务可以在服务器注册您的配置文件之前启用。下图显示了注册前启用出席信息服务的方法。

  这可以使用户在注册到服务器之前设置他们的状态。现在,用户可以注册到 SIP 服务器,而对观察程序可以显示为“离线”,并查看联系人状态。当用户要在不受干扰的情况下监视组的出席状态时,此功能非常有用。

图 3:注册前启用出席信息的步骤。

  请注意,可以在设置出席状态后调用 CreateProfile() 方法。

  下面是 XML 架构。

<?xml version="1.0" ?>

<Schema name="ProvisioningSchema.xml"
xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<comments>Schema Version MajorRevisionNumber = 1
MinorRevisionNumber = 0
</comments>

<ElementType name="provision" model="closed">
<AttributeType name="key" required="yes" />
<attribute type="key" />
<AttributeType name="name" required="yes" />
<attribute type="name" />
<AttributeType name="expires" dt:type="dateTime.tz" />
<attribute type="expires" />
<element type="user" minOccurs="1" maxOccurs="1" />
<element type="sipsrv" minOccurs="1" maxOccurs="*" />
<element type="client" minOccurs="0" maxOccurs="1" />
<element type="provider" minOccurs="0" maxOccurs="1" />
</ElementType>

<ElementType name="user" model="closed">
<AttributeType name="uri" required="yes" />
<attribute type="uri" />
<AttributeType name="account" required="no" />
<attribute type="account" />
<AttributeType name="name" required="no" />
<attribute type="name" />
<AttributeType name="password" required="no" />
<attribute type="password" />
<AttributeType name="realm" required="no" />
<attribute type="realm" />
</ElementType>

精彩图集

赞助商链接