Class FaxServerFacade
- Namespace
- SWConfigDataClientLib.Proxies.FaxServer
- Assembly
- IpPbxCDSClientLib.dll
Facade class for FaxServer
public class FaxServerFacade : FaxServerFacadeBase
- Inheritance
-
SWCFProxy<FaxServerFacadeClient, IFaxServerFacade>FaxServerFacade
- Inherited Members
Constructors
FaxServerFacade()
Create instance of FaxServerFacade. Only used by Unmanaged Wrapper. To create an instance of this class use the LibManager.
public FaxServerFacade()
Remarks
The connection will be established by the first remote call.
Properties
PoolMaxSize
depcreated
public static int PoolMaxSize { get; set; }
Property Value
PoolMinSize
depcreated
public static int PoolMinSize { get; set; }
Property Value
m_BaseUrl
protected override string m_BaseUrl { get; }
Property Value
Methods
AddFaxForwardingEntry(FaxForwardingEntryInfo)
Adds an fax forwarding entry.
public int AddFaxForwardingEntry(FaxForwardingEntryInfo entryInfo)
Parameters
entryInfo
FaxForwardingEntryInfoThe fax forwarding entry information.
Returns
- int
The added entry Id.
AddFaxJob(string)
Creates a new empty Job.
public int AddFaxJob(string szJobType)
Parameters
szJobType
stringFaxType
Returns
- int
Return new Job id.
Remarks
Defaults:
OwnerType: User
OwnerID: 0
Status: New
AddFaxJournalEntry(FaxJournalEntry)
Add FaxJournalEntry to FaxJournalTable table.
public void AddFaxJournalEntry(FaxJournalEntry entry)
Parameters
entry
FaxJournalEntryThe new entry. The date attribute will be converted to UTC if nessesary
CheckFeatureList(int, FeatureList)
Checks the Features for the given user. All features in the given list will be checked the flags Enabled and Licensed will be set.
public void CheckFeatureList(int UserID, FeatureList featureList)
Parameters
UserID
intThe UserID of the User. The UserID will be used to retrieve the Enabled information. Set UserID to 0 to retrieve license information only
featureList
FeatureListThe list of feature to be checked
CheckVersion()
public void CheckVersion()
CreateClient(Binding, EndpointAddress)
protected override FaxServerFacadeClient CreateClient(Binding binding, EndpointAddress endpointAdrress)
Parameters
binding
BindingendpointAdrress
EndpointAddress
Returns
- FaxServerFacadeClient
DeleteFaxForwardingEntry(int)
public void DeleteFaxForwardingEntry(int faxForwardingId)
Parameters
faxForwardingId
int
DeleteFaxJob(int)
Delete specified Fax Job and all attachments
public void DeleteFaxJob(int JobID)
Parameters
JobID
intThe ID of the Jax Job
DeleteFaxJobs(SIntList)
Deletes as set specified Fax Jobs and all attachments
public void DeleteFaxJobs(SIntList jobIDs)
Parameters
jobIDs
SIntList
DeleteFaxJournalUpToDate(SDateTime)
Delete all entries from from table FaxJournalTable where Date field less or equal LimitDate.
public int DeleteFaxJournalUpToDate(SDateTime LimitDate)
Parameters
LimitDate
SDateTimeThe Limit Date.(can be local time)
Returns
- int
Number of deleted entries.
DeleteFaxJournalUpToLimit(int)
Delete LimitNumber of entries from table FaxJournalTable (oldest by Date field)
public int DeleteFaxJournalUpToLimit(int Count)
Parameters
Count
intNumber of entries to be deleted.
Returns
- int
Number of deleted entries.
DownloadFile(string, PreDefinedFileCategory)
DownloadsFile a file
public string DownloadFile(string strFilename, PreDefinedFileCategory FileCategory)
Parameters
strFilename
stringFilename
FileCategory
PreDefinedFileCategoryFileCategory
Returns
- string
Filepath in local file cache
Remarks
Files in Scope User or UserDefault will not be found.
EnumAttachments(int)
Return list of all attachments for specified Job. All files will be download into local file cache if nessesary
public FaxJobAttachmentList EnumAttachments(int JobID)
Parameters
JobID
intJobID
Returns
- FaxJobAttachmentList
List of FaxJobAttachments
EnumFaxChannels()
Return list of all fax channels
public FaxChannelEntryCollection EnumFaxChannels()
Returns
- FaxChannelEntryCollection
Collection of FaxChannelEntry
FormatDateTimeWithProductCulture(SDateTime, string)
public string FormatDateTimeWithProductCulture(SDateTime date, string format)
Parameters
Returns
FreeForReuse()
public override void FreeForReuse()
GetCurrentUserID()
public int GetCurrentUserID()
Returns
GetCurrentUserName()
public string GetCurrentUserName()
Returns
GetFaxChannelInfo(int)
Return one FaxChannelEntry.
public FaxChannelEntry GetFaxChannelInfo(int ChannelID)
Parameters
ChannelID
intJobID
Returns
- FaxChannelEntry
FaxChannelEntry
GetFaxChannelStatus(int)
Return FaxChannelStatusEntry structure for given
public FaxChannelStatusEntry GetFaxChannelStatus(int ChannelID)
Parameters
ChannelID
int
Returns
- FaxChannelStatusEntry
FaxChannelStatus
GetFaxForwardingsByUserId(int)
Gets the fax forwardings configuration for the provided user Id.
public ICollection<FaxForwardingEntryInfo> GetFaxForwardingsByUserId(int userId)
Parameters
userId
intThe user id.
Returns
- ICollection<FaxForwardingEntryInfo>
GetFaxForwardingsForNumber(string, out int, out string, out string)
public FaxForwardingPrimaryCollection GetFaxForwardingsForNumber(string number, out int userID, out string userName, out string eMail)
Parameters
Returns
GetFaxJobInfo(int)
Return FaxJobEntry(Info) structure for given JobId
public FaxJobEntry GetFaxJobInfo(int JobID)
Parameters
JobID
intID of the Job
Returns
- FaxJobEntry
FaxJobEntry
GetFaxJobStatus(int)
Return FaxJobStatus structure for given JobId
public FaxJobStatusEntry GetFaxJobStatus(int JobID)
Parameters
JobID
intID of the Job
Returns
- FaxJobStatusEntry
FaxJobStatus
GetFaxJournalUpToDate(SDateTime)
Return an array of entries from table FaxJournalTable where Date field less or equal LimitDate.
public FaxJournalPrimaryCollection GetFaxJournalUpToDate(SDateTime LimitDate)
Parameters
LimitDate
SDateTimeDateTime (can be local)
Returns
- FaxJournalPrimaryCollection
Collection of FaxJournalEntries
GetFaxJournalUpToLimit(int)
Return an array of the n oldest entries from table FaxJournalTable.
public FaxJournalPrimaryCollection GetFaxJournalUpToLimit(int LimitCount)
Parameters
LimitCount
intMaximum number od returned entries
Returns
- FaxJournalPrimaryCollection
Collection of FaxJournalEntries
GetFaxServerQueueView(int, int)
Return View with basic information required to Fax Server for handling jobs.
public FaxServerQueueViewPrimaryCollection GetFaxServerQueueView(int StatusMask, int PriorityMask)
Parameters
StatusMask
intThis View will return summary information about all Jobs with "Status" field matching dwStatusMask. If dwStatusMask ist 0 all new Jobs will be returned.
PriorityMask
int1: Only Normal priority
2: Only High priority
3: Any proirity (3 is a bit mask of 1 and 2)
Returns
GetFaxServerSettings()
Returns the FaxServerSettings
public FaxServerConfigEntry GetFaxServerSettings()
Returns
- FaxServerConfigEntry
FaxServerSettings
Remarks
The returned FaxServerConfigEntry contains FaxChannel and FaxPrinter Collections. This Collection will be allways empty.
GetInternalFaxNumberOwnerID(string)
Returns the ID of the owner (user) of the given number. If the number does not exist or the number is no fax number the method will return 0.
public int GetInternalFaxNumberOwnerID(string szNumber)
Parameters
szNumber
stringThe given internal number
Returns
- int
Returns the ID of the owning user. Oherwise 0.
GetLastJournalPrintTime()
Returns parameter LastJournalPrintTime from FaxServerSettings Table If LastJournalPrintTime is not set MinDate will be returned
public SDateTime GetLastJournalPrintTime()
Returns
- SDateTime
Time of last printing
GetLoginID()
Returns a LoginID which can be used for SIP authentification for special clients.
public Guid GetLoginID()
Returns
GetNumberOfAvailableFaxChannels()
public CurrentAvailableCount GetNumberOfAvailableFaxChannels()
Returns
- CurrentAvailableCount
GetNumberOfUserWithFaxNumbers()
Retrieves the number of users with configured fax number
public int GetNumberOfUserWithFaxNumbers()
Returns
- int
number of users
GetPossibleIpPbxUserNames()
Returns all possible IpPbx User Names of the current user. Can be more than one if the current user is a windows user and multiple IppPbxUser are assigned to his windows account.
public SStringList GetPossibleIpPbxUserNames()
Returns
- SStringList
StringList
GetPreSharedKey()
Returns the current pre shared key of this user for media encryption. The key is generated and will be changed if all phone devices of the user are logged off.
public string GetPreSharedKey()
Returns
- string
String containing preshared key
Remarks
This method will use an addtional web service to provide a secure transport.
GetServerRequestTimeout(FaxServerFacadeClient)
protected override TimeSpan GetServerRequestTimeout(FaxServerFacadeClient client)
Parameters
client
FaxServerFacadeClient
Returns
GetSupportedClientVersions()
public SStringList GetSupportedClientVersions()
Returns
GetTotalLicenses(out uint, out uint, out int)
Returns some Fax lincense infos.
public void GetTotalLicenses(out uint EffectiveTotalFaxUsers, out uint EffectiveTotalFaxChannels, out int hr)
Parameters
GetUserIdByUserName(string)
Returns the User Id for the given UserName
public int GetUserIdByUserName(string userName)
Parameters
userName
stringUsername
Returns
HasRole(BuildInRoles)
public bool HasRole(BuildInRoles eRole)
Parameters
eRole
BuildInRoles
Returns
JobAttachFile(int, int, EFaxAttachementType, bool, string, string, int)
Attach to Job specified file
public void JobAttachFile(int JobID, int dwPosition, EFaxAttachementType eType, bool bCover, string strFileName, string strDescription, int dwPages)
Parameters
JobID
intID of the Job
dwPosition
intIf position is less than 0, file will be placed to the end, otherwise to specified position
eType
EFaxAttachementTypeAttachment Type
bCover
boolIs cover page
strFileName
stringName of the file to be added
strDescription
stringDescrioption
dwPages
int
LockJob(int, bool)
Lock or unlock Fax job
public void LockJob(int JobID, bool bLock)
Parameters
JobID
intID of the FaxJob
bLock
boolIf bLock =TRUE and Job is already locked, an exception will be raised (can't lock the job which is already locked)
If bLock =FALSE, status will be changed to Unlocked in any case
Remarks
All lock operation will be synchronized.
PingService(FaxServerFacadeClient)
protected override void PingService(FaxServerFacadeClient client)
Parameters
client
FaxServerFacadeClient
RegisterFaxServer(string, FaxServerInfo, FaxServerCallbackSubscription)
This function must be called by Fax Server on start up to register at CDSService. Registration required to let CDSService know where to redirect all clients calls, required Fax Server COM interface token must be used to in the StartWeService method of ICDSFacadeManager
public void RegisterFaxServer(string szHost, FaxServerInfo info, FaxServerCallbackSubscription callbackSubscription)
Parameters
szHost
stringThe name of the host the FaxServer is running on.
info
FaxServerInfocallbackSubscription
FaxServerCallbackSubscription
SetFaxChannelStatus(int, FaxChannelStatusEntry)
CDSService updates the status of a channel
public void SetFaxChannelStatus(int ChannelID, FaxChannelStatusEntry entry)
Parameters
ChannelID
intID of the channel
entry
FaxChannelStatusEntryThe entry containing all new status values
Remarks
This method does not detect concurrency vioalations. (Nevertheless concurrency violation exception can be thrown)
SetFaxJobInfo(int, FaxJobEntry)
CDSService updates Jobs entry in FaxJobs Table
public void SetFaxJobInfo(int JobID, FaxJobEntry entry)
Parameters
JobID
intID of the Job
entry
FaxJobEntryThe entry containing all new values
Remarks
This method does not detect concurrency vioalations. (Nevertheless concurrency violation exception can be thrown)
SetFaxJobStatus(int, FaxJobStatusEntry)
CDSService updates Jobs entry in FaxJobs Table
public void SetFaxJobStatus(int JobID, FaxJobStatusEntry entry)
Parameters
JobID
intID of the Job
entry
FaxJobStatusEntryThe entry containing all new status values
Remarks
This method does not detect concurrency vioalations. (Nevertheless concurrency violation exception can be thrown)
SetFaxServerSettings(FaxServerConfigEntry)
Saves the FaxServer settings
public void SetFaxServerSettings(FaxServerConfigEntry entry)
Parameters
entry
FaxServerConfigEntryThe Fax Server Settings
SetLastJournalPrintTime(SDateTime)
Updates last journal print time in Fax Server general settings
public void SetLastJournalPrintTime(SDateTime LastPrintTime)
Parameters
LastPrintTime
SDateTimeTime of last printing
UnlockAllJobs()
Unlocks all locked jobs.
public int UnlockAllJobs()
Returns
- int
Number of unlocked jobs.
Remarks
All lock operation will be synchronized.
UnregisterFaxServer(string)
public bool UnregisterFaxServer(string szHost)
Parameters
szHost
string