Class UserNumberMappingList
- Namespace
- SWConfigDataClientLib.Proxies.IppbxServer
- Assembly
- IpPbxCDSClientLib.dll
List that contains all user public number mappings. The list of mappings will be loaded from CDS and sorted locally. The class will use change interests to update the list. All public methods are thread safe.
public class UserNumberMappingList
- Inheritance
-
UserNumberMappingList
Constructors
UserNumberMappingList()
Standard Constructor. Initializes an empty list.
public UserNumberMappingList()
Methods
GetUserID(string, out bool, out NumberOwnerListPrimaryCollection)
Retrieves the UserID of the first mapping (prefix compare) with a number matching the given search number.
public int GetUserID(string strSearchNumber, out bool bAmbiguous, out NumberOwnerListPrimaryCollection NumberOwnerList)
Parameters
strSearchNumberstringThe given searchnumber
bAmbiguousboolTrue is there are more than one matching mappings.
NumberOwnerListNumberOwnerListPrimaryCollectionReturns a list of matching user number entries. The NumberAccessGranted will set to true for all entries.
Returns
- int
The UserID of the first matching mapping. If no mappings matches the method will return 0.
Remarks
This method approaches an O(log n) operation.
GetUserID(string, out string, out string, out bool, out bool)
Retrieves the UserID of a the first mapping (prefix compare) with a number matching the given search number.
public int GetUserID(string strSearchNumber, out string strFoundPublicNumber, out string strFoundInternalNumber, out bool bIsMatchingNumberInternal, out bool bAmbiguous)
Parameters
strSearchNumberstringThe given searchnumber
strFoundPublicNumberstringThe public number of the first matching mapping.
strFoundInternalNumberstringThe internal number of the first matching public number mapping.
bIsMatchingNumberInternalboolbAmbiguousboolTrue is there are more than one matching mappings.
Returns
- int
The UserID of the first matching mapping. If no mappings matches the method will return 0.
Remarks
This method approaches an O(log n) operation.
GetUserID(string, out string, out string, out bool, out bool, out bool)
Retrieves the UserID of a the first mapping (prefix compare) with a number matching the given search number.
public int GetUserID(string strSearchNumber, out string strFoundPublicNumber, out string strFoundInternalNumber, out bool bIsMatchingNumberInternal, out bool bAmbiguous, out bool bIsFaxNumber)
Parameters
strSearchNumberstringThe given searchnumber
strFoundPublicNumberstringThe public number of the first matching mapping.
strFoundInternalNumberstringThe internal number of the first matching public number mapping.
bIsMatchingNumberInternalboolbAmbiguousboolTrue is there are more than one matching mappings.
bIsFaxNumberboolTrue if number is a fax number.
Returns
- int
The UserID of the first matching mapping. If no mappings matches the method will return 0.
Remarks
This method approaches an O(log n) operation.
GetUserID(string, out string, out string, out bool, out bool, out bool, out bool)
Retrieves the UserID of a the first mapping (prefix compare) with a number matching the given search number.
public int GetUserID(string strSearchNumber, out string strFoundPublicNumber, out string strFoundInternalNumber, out bool bIsMatchingNumberInternal, out bool bAmbiguous, out bool bIsFaxNumber, out bool bIsCallAllowed)
Parameters
strSearchNumberstringThe given searchnumber
strFoundPublicNumberstringThe public number of the first matching mapping.
strFoundInternalNumberstringThe internal number of the first matching public number mapping.
bIsMatchingNumberInternalboolbAmbiguousboolTrue is there are more than one matching mappings.
bIsFaxNumberboolTrue if number is a fax number.
bIsCallAllowedboolReturns true if user is allowed to call the relosved number
Returns
- int
The UserID of the first matching mapping. If no mappings matches the method will return 0.
Remarks
This method approaches an O(log n) operation.
Initialize(LibManager)
Initializes the list. The change interests will be subscribed and the mappings will be loaded from the CDS.
public void Initialize(LibManager libManager)
Parameters
libManagerLibManagerThe current LibManager.
Remarks
Call this method during start/activation of the IpPbxSrv
Reset()
Unsubscribes the change interest from the CDS and clears the list.
public void Reset()
Remarks
Call this during shutdown of the IpPbxSrv.