QueryCategory
The
QueryCategoryfunction fetches an item published in a
specified enhanced presence container.
Syntax
|
Copy code
|
string QueryCategory(
string or Uri Publisher,
int ContainerNumber,
string CategoryName,
int Instance,
bool PublisherIsPhone
);
|
Parameters
-
Publisher
-
The identity of the presence publisher. Can be a SIP URI, a user
URI in the form user@host, or a telephone number.
-
ContainerNumber
-
The container identification number.
-
CategoryName
-
The name of the presence category. Valid category names are
"userProperties", "workingHours", "dndState", "routing", and
"contactCard".
-
Instance
-
The instance identification number.
-
PublisherIsPhone
-
Optional. The value is
true
if the publisher is a phone; otherwise,
false
.
Return values
Returns an XML string representation of the specified presence
category if the category name is "userProperties", "workingHours",
"dndState", "routing" or "contactCard". Otherwise the function
returns null.
Remarks
Microsoft Lync Server 2013 provides the infrastructure to enable
client applications to publish and subscribe to enhanced presence
information. The enhanced presence infrastructure includes
categories and containers. Categories are individual pieces of
presence information, such as status, location, or calendar state.
Containers are logical buckets into which clients publish instances
of various categories of presence information.
Example code
|
Copy code
|
publication = QueryCategory("sip:someone@example.com", 1,
"userProperties", 0);
|
Example code
|
Copy code
|
publication = QueryCategory("someone@example.com", 1,
"workingHours", 0, false);
|
Example code
|
Copy code
|
publication = QueryCategory("someone@example.com", 1, "dndState",
0, true);
|