Class LibManager
- Namespace
- SWConfigDataClientLib
- Assembly
- IpPbxCDSClientLib.dll
public class LibManager : Component, IIpPbxUserCredentials
- Inheritance
-
LibManager
- Implements
Constructors
LibManager()
Standard constructor
public LibManager()
LibManager(bool)
Standard constructor
public LibManager(bool CheckConfigurationOnStart)
Parameters
CheckConfigurationOnStart
boolChecks client configuration. Certificate, Policy etc.
LibManager(IContainer)
Standard constructor with container
public LibManager(IContainer container)
Parameters
container
IContainercontainer
Fields
SecurityTrace
protected static STraceInfo SecurityTrace
Field Value
- STraceInfo
m_DefaultCallbackRequestTimeout
public static TimeSpan m_DefaultCallbackRequestTimeout
Field Value
m_DefaultRequestTimeout
public static TimeSpan m_DefaultRequestTimeout
Field Value
m_MinRequestTimeout
public static TimeSpan m_MinRequestTimeout
Field Value
Properties
AppName
public static string AppName { get; set; }
Property Value
AuthenticationEventSubscription
public AuthenticationEventSubscription AuthenticationEventSubscription { set; }
Property Value
AuthenticationMode
Get or sets the current AuthenticationMode.
public SProxyObject.AuthenticationMode AuthenticationMode { get; set; }
Property Value
- SProxyObject.AuthenticationMode
BaseProtocol
Set or gets the tranport protocol. (SOAP/HTTP, SOAP/TCP)
public SProxyObject.BaseProtocol BaseProtocol { get; set; }
Property Value
- SProxyObject.BaseProtocol
ClientTimeoutEnabled
Deprecated: Flag to enable disable client timeouts. This flag will only be used if TCP protocol is configured. Default is true. Currently only PhoneClientFacade, FileFacade and UserPhoneBookEnum are supported.
public bool ClientTimeoutEnabled { get; set; }
Property Value
ClientVersion
public static string ClientVersion { get; }
Property Value
DefaultTCPPort
Returns the default CDS TCP/IP port
public static uint DefaultTCPPort { get; }
Property Value
DownloadChunkSizeInByte
public static int DownloadChunkSizeInByte { get; set; }
Property Value
EncodedJasonWebToken
Sets the base 64 encoded jason web token. The token is required for json web token authentification
public string EncodedJasonWebToken { set; }
Property Value
IpPbxUserName
Specifies the current IpPbxUser when using Trusted, TrustedPlain or Kerberos authentification. Only nescassary when the relation of windows and ippbx user is not unique.
public string IpPbxUserName { get; set; }
Property Value
LoginData
Gets, Sets the LoginData. LoginData contains all nesessary data for authentication.
public LoginData LoginData { get; set; }
Property Value
- LoginData
MaxConnections
Gets or sets the amount of the maximal connection
public int MaxConnections { get; set; }
Property Value
Password
Sets the users password. A password is required for username password authentication mode.
public string Password { set; }
Property Value
PasswordRequired
public bool PasswordRequired { get; }
Property Value
PoolingEnabled
(deprecated) Gets or sets weather the pooling of wbservices proxies is activated. Default is true.
public bool PoolingEnabled { get; set; }
Property Value
Port
Gets or sets the servers TCP port. Default: (TCP 9091, HTTP 80)
public int Port { get; set; }
Property Value
Remarks
The default values for the port can be configured in the config file.
ProxyCacheEnabled
public static bool ProxyCacheEnabled { get; set; }
Property Value
RefreshToken
Sets the refresh token. This token is required for refreshing json web tokens
public string RefreshToken { set; }
Property Value
ReportingPort
Gets or sets the servers TCP port. Default: (TCP 9092, HTTP 80)
public int ReportingPort { get; set; }
Property Value
Remarks
The default values for the port can be configured in the config file.
RequestId
Request id, used for distributed tracing (swyx on)
public string RequestId { get; set; }
Property Value
RequestTimeout
Get or set the current Timeout for WCF Requests
public int RequestTimeout { get; set; }
Property Value
SecurityEnabled
Get and sets weather the security is enabled, default is true. Setting this value true reuquires that the ConfigDataStore accepts requests without security enabled.
public bool SecurityEnabled { get; set; }
Property Value
SkipIsLocalCheck
public bool SkipIsLocalCheck { get; set; }
Property Value
SubscriberID
public Guid SubscriberID { get; }
Property Value
TcpPort
public static int TcpPort { set; }
Property Value
TokenExpired
public bool TokenExpired { get; }
Property Value
TokenValidUntil
public SDateTime TokenValidUntil { get; }
Property Value
UploadChunkSizeInByte
public static int UploadChunkSizeInByte { get; set; }
Property Value
Username
Gets or sets the username of the current user. A username is required for username password authentication mode.
public string Username { get; set; }
Property Value
WSBaseUrl
The base address of the web service. (Like: computer.swyx.net)
public string WSBaseUrl { get; set; }
Property Value
Remarks
If empty (default) the localhost will be used.
Methods
AcquireTokenFromCds(string, string, string)
public static LoginResult AcquireTokenFromCds(string wsBaseUrl, string username, string password)
Parameters
Returns
ApplyCredentials(string, string)
public UserLoginResult ApplyCredentials(string userName, string password)
Parameters
Returns
ApplyCurrentWindowsAccount(string, bool)
Authenticates and connects the LibManager to CDS using the WSBaseUrl
public WindowsLoginResult ApplyCurrentWindowsAccount(string ipPbxUserName, bool includeExternalUsers)
Parameters
ipPbxUserName
stringdisplay name (can be set to empty string)
includeExternalUsers
boolIf this flag is set and the windows is an external admin of the SwyxWare (e.g. The installation user), the administrative rights from this user will added to the current session
Returns
ApplyFederatedAccount(string, bool)
public FederatedLoginResult ApplyFederatedAccount(string accountId, bool trySilent)
Parameters
Returns
ApplyLoginResult(LoginResult)
public void ApplyLoginResult(LoginResult loginResult)
Parameters
loginResult
LoginResult
CheckConfiguration()
Checks the following configuration elements.
- ConfigFile: The config file of the application will be checked.
- IpPpx.cer: Checks the existence of the X509 certificate file.
public void CheckConfiguration()
Exceptions
- SConfigException
When configurations invalid.
ClearAvatarCollection()
public void ClearAvatarCollection()
ClearPool()
deprecated
public void ClearPool()
ClearUserCredentials()
public void ClearUserCredentials()
CloseCallbackConnection()
public void CloseCallbackConnection()
CloseLoginChannelFactories()
public static void CloseLoginChannelFactories()
CreateConnectedLibManager(string, string, string)
public static LibManager CreateConnectedLibManager(string wsBaseUrl, string username, string password)
Parameters
Returns
CreateLibManager(int)
Returns a cached or preinitialized libmanager
public static LibManager CreateLibManager(int timeout)
Parameters
timeout
intWaits maximal timout in milliseconds. If the timeout occured a new instance will be returned
Returns
CreatePasswordResetRequest(string, string)
public static UserPasswordResetRequestResult CreatePasswordResetRequest(string wsBaseUrl, string userEmailAddress)
Parameters
Returns
- UserPasswordResetRequestResult
Dispose(bool)
Clean up any resources being used.
protected override void Dispose(bool disposing)
Parameters
disposing
bool
Free()
public void Free()
FreeForReuse()
The Current LibManager will be cached. Next call of LibManager.CreateLibManager will reuturn this instance
public void FreeForReuse()
GetAccessProfileEnum()
Creates a AccesProfileEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public AccessProfileEnum GetAccessProfileEnum()
Returns
- AccessProfileEnum
AccesProfileEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetAdminFacade()
Creates a AdminFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public AdminFacade GetAdminFacade()
Returns
- AdminFacade
AdminFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetDcfFacade()
Creates a DcfFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public DcfFacade GetDcfFacade()
Returns
- DcfFacade
DlsFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetEditablePhonebookEnum()
Creates a EditablePhoneBookEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public EditablePhonebookEnum GetEditablePhonebookEnum()
Returns
- EditablePhonebookEnum
EditablePhoneBookEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetFaxAdminFacade()
Creates a FaxAdminFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public FaxAdminFacade GetFaxAdminFacade()
Returns
- FaxAdminFacade
FaxAdminFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetFaxClientFacade()
Creates a FaxClientFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public FaxClientFacade GetFaxClientFacade()
Returns
- FaxClientFacade
FaxClientFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetFaxPrinterGatewayFacade()
Creates a FaxPrinterGatewayFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public FaxPrinterGatewayFacade GetFaxPrinterGatewayFacade()
Returns
- FaxPrinterGatewayFacade
FaxPrinterGatewayFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetFaxServerFacade()
Creates a FaxServerFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public FaxServerFacade GetFaxServerFacade()
Returns
- FaxServerFacade
FaxServerFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetFeatureProfileEnum()
Creates a FeatureProfileEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public FeatureProfileEnum GetFeatureProfileEnum()
Returns
- FeatureProfileEnum
FeatureProfileEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetFederationInfoSmall(string)
public static TenantFederationInfoSmall GetFederationInfoSmall(string wsBaseUrl)
Parameters
wsBaseUrl
string
Returns
GetFileCacheBaseFolder()
public string GetFileCacheBaseFolder()
Returns
GetFilesFacade()
Creates a FilesFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public FilesFacade GetFilesFacade()
Returns
- FilesFacade
FilesFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetFirmwareEnum()
Creates a FirmwareEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public FirmwareEnum GetFirmwareEnum()
Returns
- FirmwareEnum
FirmwareEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetGlobalConfigEntry()
Get the GlobalConfigEntry object. This mehtods do not use the pooling mechanism.
public GlobalConfigEntry GetGlobalConfigEntry()
Returns
- GlobalConfigEntry
GlobalConfigEntry object
GetGlobalConfigEnum()
Creates a GlobalConfigEnum object with the current addressing and authentication configuration. The web service will be called implicitly. Use this Enum when pooling schould be used.
public GlobalConfigEnum GetGlobalConfigEnum()
Returns
- GlobalConfigEnum
GlobalConfigEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetGlobalConfigItems()
Get the GlobalConfigItems object
public GlobalConfigItems GetGlobalConfigItems()
Returns
- GlobalConfigItems
GlobalConfigEnum object
GetGroupEnum()
Creates a GroupEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public GroupEnum GetGroupEnum()
Returns
- GroupEnum
GroupEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetInternalNumberEnum()
Creates an InternalNumberEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public InternalNumberEnum GetInternalNumberEnum()
Returns
- InternalNumberEnum
InternalNumberEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetIppbxServerFacade()
Creates a IppbxServerFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public IppbxServerFacade GetIppbxServerFacade()
Returns
- IppbxServerFacade
IppbxServerFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetLocationEnum()
Creates a LocationEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public LocationEnum GetLocationEnum()
Returns
- LocationEnum
LocationEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetPhoneClientFacade()
Creates a PhoneClientFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public PhoneClientFacade GetPhoneClientFacade()
Returns
- PhoneClientFacade
PhoneClientFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetPortBundleEnum()
Creates a PortBundleEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public PortBundleEnum GetPortBundleEnum()
Returns
- PortBundleEnum
PortBundleEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetPortManagerFacade()
Creates a PortManagerFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public PortManagerFacade GetPortManagerFacade()
Returns
- PortManagerFacade
PortManagerFacade
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetPublicNumberEnum()
Creates a PublicNumberEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public PublicNumberEnum GetPublicNumberEnum()
Returns
- PublicNumberEnum
PublicNumberEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetReportingFacade()
Creates a ReportingFacade object with the current addressing and authentication configuration. The web service will be called implicitly.
public ReportingFacade GetReportingFacade()
Returns
- ReportingFacade
ReportingFacade
Remarks
This facade is only avaiable on reporting services. This client proxy will never be pooled
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetRoleEnum()
Creates a RoleEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public RoleEnum GetRoleEnum()
Returns
- RoleEnum
RoleEnum
Remarks
The authenticated user must have the role Administrator to access the this service.
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetTypeFullNameOfException(Exception)
Retuns the the FullName of the Exception Type Designed to be used by unmanaged code clients to retrieve the type of an unwrapped Exceptions
public static string GetTypeFullNameOfException(Exception ex)
Parameters
ex
ExceptionThe Exception
Returns
- string
The full quailified type of the exception in string representation.
GetTypeNameOfException(Exception)
Retuns the the Name of the Exception Type. Designed to be used by unmanaged code clients to retrieve the type of an unwrapped Exceptions
public static string GetTypeNameOfException(Exception ex)
Parameters
ex
ExceptionThe Exception
Returns
- string
The type of the exception in string representation.
GetUserEnum()
Creates an UserEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public UserEnum GetUserEnum()
Returns
- UserEnum
UserEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
GetUserPhoneBookEnum()
Creates a UserPhoneBookEnum object with the current addressing and authentication configuration. The web service will be called implicitly.
public UserPhoneBookEnum GetUserPhoneBookEnum()
Returns
- UserPhoneBookEnum
UserPhoneBookEnum
Exceptions
- Exception
Unspecified failure in addressing, authentication or authorization
- SSecurityException
Specified security failure
- SBaseException
Others
HasCurrentUserRole(BuildInRoles)
Returns true if the current user has the given role.
public bool HasCurrentUserRole(BuildInRoles role)
Parameters
role
BuildInRolesThe Role to be checked for
Returns
- bool
True if the current user owns the given role.
LoadAllAfterReconnect()
public void LoadAllAfterReconnect()
OnClientShutdown()
public static void OnClientShutdown()
PreInitializeCDSClientForPbxUser()
This mehtod can be optionally called to improve start performance
public static void PreInitializeCDSClientForPbxUser()
PreInitializeCDSClientForPbxUser(out string)
This method can be optionally called to improve start performance
public static void PreInitializeCDSClientForPbxUser(out string strLastConnectedServer)
Parameters
strLastConnectedServer
stringReturns the last server that was successfully connected or an empty string.
RefreshTokenAtCds(string, string)
public static LoginResult RefreshTokenAtCds(string wsBaseUrl, string refreshToken)
Parameters
Returns
RemoveCurrentTokenCache()
public void RemoveCurrentTokenCache()
ResetPassword()
public void ResetPassword()
RestartCallbackFacade()
public void RestartCallbackFacade()
StopCallbackFacade()
public void StopCallbackFacade()
Subscribe(CallbackSubscription)
Subscribes a change notification subscription at the CDS. After the subscription has been subscribed the changes will be notified by the events and the virtual method of the subscription class.
public void Subscribe(CallbackSubscription Subscription)
Parameters
Subscription
CallbackSubscriptionThe subscription
SubscribeForServerControl(bool)
Subscribes for server control methods
public void SubscribeForServerControl(bool value)
Parameters
value
bool
UnSubscribe(CallbackSubscription)
Removes a subscription from the CDS. Changes will no longer be notified
public void UnSubscribe(CallbackSubscription Subscription)
Parameters
Subscription
CallbackSubscriptionThe subscription
UnregisterForActivatePortLED()
public void UnregisterForActivatePortLED()
UserPasswordResetWithToken(string, string, string)
public static UserPasswordResetWithTokenResult UserPasswordResetWithToken(string wsBaseUrl, string token, string password)
Parameters
Returns
- UserPasswordResetWithTokenResult
ValidateAccessTokenAtCds(string, string, out string)
public static bool ValidateAccessTokenAtCds(string wsBaseUrl, string accessToken, out string details)
Parameters
Returns
ValidateUserPasswordResetToken(string, string)
public static UserPasswordResetTokenValidationResult ValidateUserPasswordResetToken(string wsBaseUrl, string token)
Parameters
Returns
- UserPasswordResetTokenValidationResult
Verbose()
public string Verbose()
Returns
VerifyCredentials(string, string, string)
public static UserLoginResult VerifyCredentials(string wsBaseUrl, string userName, string password)
Parameters
Returns
WaitStopCallDetailRecordWriter(int)
public bool WaitStopCallDetailRecordWriter(int millseconds)
Parameters
millseconds
int
Returns
WaitStopPhoneCallWriter(int)
public bool WaitStopPhoneCallWriter(int millseconds)
Parameters
millseconds
int