UCC_CONTAINER_MEMBERSHIP_SCOPE Enumeration
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Enumerates the container membership scope of a container member.
Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
Syntax
'Declaration
Public Enumeration UCC_CONTAINER_MEMBERSHIP_SCOPE
public enum UCC_CONTAINER_MEMBERSHIP_SCOPE
public enum class UCC_CONTAINER_MEMBERSHIP_SCOPE
public enum UCC_CONTAINER_MEMBERSHIP_SCOPE
public enum UCC_CONTAINER_MEMBERSHIP_SCOPE
Members
Member name | Description |
---|---|
UCCCMS_COMPANY | A flag indicating that the container is accessible by users within an enterprise network. |
UCCCMS_DOMAIN | A flag indicating that the container is accessible by users from designated domains. |
UCCCMS_EVERYONE | A flag indicating that the container can be accessed without restrictions. |
UCCCMS_FEDERATED_ENTERPRISE | A flag indicating that the container is accessible by users across federated enterprise networks. |
UCCCMS_FEDERATED_PUBLIC | A flag indicating that the container is accessible by users across federated public networks. |
UCCCMS_USER | A flag indicating that the container is accessible by designated users. |
Remarks
The container membership scope defines the access rights used to control how the category instances published to the container can be accessed. This enumeration is used to set the value of Scope as well as providing query criterion value for an instance of IUccContainerMembershipManager when the container membership manager is used by a client to find a set of container members.
Win32 COM/C++ Syntax
typedef enum UCC_CONTAINER_MEMBERSHIP_SCOPE
{
UCCCMS_USER = 0,
UCCCMS_DOMAIN = 1,
UCCCMS_COMPANY = 2,
UCCCMS_FEDERATED_ENTERPRISE = 3,
UCCCMS_FEDERATED_PUBLIC = 4,
UCCCMS_EVERYONE = 5
};
Example
The following example creates a new container member, specifying the member scope with the enum. The CreateContainerMember method is called. The created container membership scope is an enterprise network.
IUccContainerMember member = pubMgr.CreateContainerMember(
null,
UCC_CONTAINER_MEMBERSHIP_SCOPE
.UCCCMS_COMPANY);
The following example is a snippet from a client method that accepts an IUccCategoryContext argument (pCategoryCtx
). It uses a container membership manager instance to find a container member based on a member scope of UCCCMS_EVERYONE. The TryFindContainerMember is used to return the container member matching a user's query criteria.
this.cmm = pCategoryCtx as IUccContainerMembershipManager;
if (this.cmm.TryFindContainerMember(
URI,
UCC_CONTAINER_MEMBERSHIP_SCOPE
.UCCCMS_EVERYONE,
UCC_CONTAINER_MEMBER_MATCHING_TYPE
.UCCCMMT_BEST,
out cm) != true)
{
cm = null;
}
The following example gets a collection of IUccCategoryInstance instances where the member Uri, category name, and scope match the passed arguments. GetCategoryInstancesForUri is called on an instance of IUccContainerMembershipManager. The returned collection represents the category instances a given subscribing user gets from a subscription to the local user's published categories.
IUccCollection cl = null;
cl = this.cmm.GetCategoryInstancesForUri(
u,
Category,
UCC_CONTAINER_MEMBERSHIP_SCOPE
.UCCCMS_USER);
The following example gets a collection of container members matching the specified scope. The GetMembersWithScope is called on a given IUccContainer instance.
IUccCollection members = this._container.GetMembersWithScope(pScope);
Boolean foundMember = false;
foreach (IUccContainerMember m in members)
{
if (m.Uri.ToLower() == pUri.ToLower())
{
foundMember = true;
break;
}
}
if (foundMember == false)
{
member = pPm.CreateContainerMember(pUri, pScope);
this._container.AddMember(member);
returnValue = true;
}
The following example gets the Scope of a given IUccContainerMember instance. The example is a snippet from a client application class property where the class wraps an IUccContainerMember instance.
public string Uri
{
get
{
if (this.cm.Scope == UCC_CONTAINER_MEMBERSHIP_SCOPE.UCCCMS_DOMAIN ||
this.cm.Scope == UCC_CONTAINER_MEMBERSHIP_SCOPE.UCCCMS_USER)
{
return this.cm.Uri;
}
else
{
return string.Empty;
}
}
}
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition