/*--------------------------------------------------------------------------- Swyx Solutions AG Joseph-von-Fraunhofer-Str. 13a 44227 Dortmund --------------------------------------------------------------------------- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. Copyright (C) 2011 Swyx Solutions AG All Rights Reserved. --------------------------------------------------------------------------- Project: Swyx Client SDK Module: Comments: definition of public client line manager interface ----------------------------------------------------------------------------*/ #ifndef _CLMGRPUBTYPES_H #define _CLMGRPUBTYPES_H #ifndef LO10BIT #define LO10BIT(w) (((DWORD_PTR)(w)) & 0x3ff) #endif #ifndef HI6BIT #define HI6BIT(w) ((((DWORD_PTR)(w)) >> 10) & 0x3f) #endif /// /// message parameters for state information from line manager to client, /// send as wParam of RegisterWindowMessage(_T("WM_LineMgrNotification")) /// typedef enum { PubCLMgrLineStateChangedMessage=0, ///< state of a line has changed\n ///< lParam: index of line PubCLMgrLineSelectionChangedMessage, ///< line selection has changed, new line in focus\n ///< lParam: index of now selected line PubCLMgrLineDetailsChangedMessage, ///< details of line has changed\n ///< lParam: index of line PubCLMgrUserDataChangedMessage, ///< user configuration has changed\n ///< lParam: what part of the user data has been changed\n ///< if lUserDataChangedContext is 0, anything might have changed\n /** @verbatim typedef enum { // main user record SCl5UDCCRecord = 0x00000001, // user's binary data object (blob) SCl5UDCCBinaryData = 0x00000002, // user's phonebook SCl5UDCCPhonebook = 0x00000004, // user's relations SCl5UDCCRelations = 0x00000008, // user's redial list SCl5UDCCRedialList = 0x00000010, // user's phone call list SCl5UDCCPhoneCallList = 0x00000020, // user's phone callback list SCl5UDCCPhoneCallbackList = 0x00000040, // user's situations SCl5UDCCSituations = 0x00000080, } SCl5UserDataChangeContext; @endverbatim */ ///< PubCLMgrCallDetailsMessage, ///< details of last call are available, after disconnect, for logging purpose\n ///< lParam: index of line PubCLMgrServerDownMessage, ///< server is down, will be rebooted, ...\n ///< -> keep interfaces to line manager, wait for ServerUp message PubCLMgrServerUpMessage, ///< server is up again -> keep interfaces to line manger PubCLMgrWaveDeviceChanged, ///< speaker and / or micro has been switched on or off\n ///< lParam: 0:no problem\n ///< lParam: 1:there was an error, could not enable micro or speaker PubCLMgrGroupCallNotificationMessage, ///< notification about signaled call we could pick up now\n ///< lParam: 1:signaled call available\n ///< lParam: 0:signaled call not available / no longer available PubCLMgrNameKeyStateChangedMessage, ///< notification about changed namekey state\n ///< lParam: index of namekey that has new state PubCLMgrNumberOfLinesChangedMessage, ///< the number of lines has changed\n ///< lParam: new number of lines PubCLMgrClientShutDownRequest, ///< Client Line Manager requests client to shutdown and release all interfaces PubCLMgrPowerSuspendMessage, ///< client machine goes to hibernate or suspend mode\n ///< -> keep interfaces to line manager, wait for PowerResume message PubCLMgrPowerResumeMessage, ///< client machine has returned from suspend mode -> keep interfaces to line manager PubCLMgrHandsetStateChangedMessage, ///< state of handset has changed\n ///< lParam: new handset state 0 = on hook, 1 = off hook PubCLMgrSkinPhoneCommandMessage, ///< for forwarding commands from PlugIn to SwyxIt!.exe.\n ///< lParam will contain the requested command (dwCommandId+dwButtonId)\n ///< should be handled only by SwyxIt! PubCLMgrSkinActionAreaStateChangedMessage, ///< informing clients about a changed action area state.\n ///< lParam will contain the id of the action area that has changed (dwCommandId+dwButtonId)\n ///< This event will be ignored by SwyxIt!.exe. PubCLMgrSkinInfoDetailChangedMessage, ///< informing clients about changed information area details.\n ///< lParam will contain the index of the information detail that has changed.\n ///< This event will be ignored by SwyxIt!.exe. PubCLMgrCallbackOnBusyNotification, ///< informing clients about available callback on busy\n ///< lParam=1: callback available; lParam=0: callback no longer available\n ///< lParam=2: callback back on busy was signaled but no user response (pickup / reject)\n ///< lParam=3: there is no "signaled callback on busy" left -> reset button state PubCLMgrAsyncMessage, ///< message for reporting success or problems that occured within state machine / were reported by server\n ///< lParam will contain the result code PubCLMgrCtiPairingStateChanged, ///< informing clients about changed state of CTI pairing process\n ///< lParam=new CTI pairing state\n /** @verbatim typedef enum { CtiSessNone=-1, CtiSessIdle=0, //no cti activity CtiSessMasterPairingRequested, //CTI master has requested pairing CtiSessSlavePairingRequested, //CTI slave has received pairing request CtiSessMasterPaired, //CTI master has established pairing CtiSessSlavePaired, //CTI slave has established pairing CtiSessMaxStates } CtiSessionStates; @endverbatim */ PubCLMgrChatMessage, ///< for call clients that have registered as chat message receiver: new message available\n ///< other clients can ignore this message PubCLMgrChatMessageAck, ///< for call clients that have registered as chat message receiver:\n ///< a chat message sent from this client has been acknowledged by an application on peer side\n ///< lParam=message id of confirmed chat message PubCLMgrRecordingError, ///< Error on recording conversation\n ///< lParam=windows error code PubCLMgrVolumeChanged, ///< Volume of sound device has changed\n ///< lParam=new volume 0..100 percent PubCLMgrAudioModeChanged, ///< Current audio mode has changed\n ///< lParam=new audio mode\n ///< AudioModeIdle = 0,\n ///< AudioModeHandset,\n ///< AudioModeHeadset,\n ///< AudioModeHandsfreeListening,\n ///< AudioModeIntercom,\n ///< AudioModeRinging\n PubCLMgrMicAdjustLevelMeter, ///< Peak level meter during microphone adjustment\n ///< lParam=new level meter value 0..100 percent PubCLMgrMicAdjustProceedMeter, ///< Proceed level during microphone adjustment\n ///< lParam=new proceed value 0..100 percent PubCLMgrLineStateChangedMessageEx, ///< state of at least line has changed\n ///< lParam: LOBYTE: line index\n ///< HIBYTE: new state PubCLMgrPlaySoundFileDxProceedMeter, ///< Proceed level during PlaySoundFileDx playback\n ///< lParam=new proceed value 0..100 percent PubCLMgrSIPRegistrationStateChanged, ///< registration state of SIP account has changed\n ///< lParam: LOBYTE: Account index\n ///< HIBYTE: new state PubCLMgrWaveFilePlayed, ///< wave file playback finished\n ///< lParam: line index;\n ///< if -1, the message is related to a LineMgr function PlaySoundFile or PlayToRtp\n ///< if >=0 the message is related to a line function PlaySoundFile of line with this index PubCLMgrFirstDataReceived, ///< wave file playback finished\n ///< lParam: line index; PubCLMgrRegisteredSipDeviceListChanged, ///< number of registered dialer mode compatible (SIP) devices for own user changed\n ///< lParam: number of registered devices PubCLMgrDialerStartCallResult, ///< message for reporting start call success or failure in dialer mode\n ///< lParam will contain the SIP result code PubCLMgrLineStateChangedMessageEx2, ///< state of at least line has changed\n ///< lParam: lower 10 bits: line index (0..1023)\n ///< upper 6 bits: new state (0..63, currently used 0..15) PubCLMgrMediaEncryptionStatusChanged, ///< media encryption status has changed\n ///< lParam: lower 16 bits: line index\n ///< upper 16 bits: new state\n ///< EncryptionStateNoCall = 0,\n ///< EncryptionStateNotEncrypted,\n ///< EncryptionStateEncrypted PubCLMgrLateDisconnect, ///< signal late disconnect\n ///< lParam: line index PubCLMgrDeviceStateChanged, ///< signal changes on available devices PubCLMgrBlockDialStringChanged, ///< block dial string changed by CTI partner PubCLMgrPlaySoundFileState, ///< lParam: 0 stopped, 1 started, 2 paused PubCLMgrVoicemailPlayerAudioMode ///< lParam: 0 Handset, 1 Headset, 2 Handsfree, 3 OpenListening } PubCLMgrMessages; /// /// async error messages /// typedef enum { PubCLMgrAsyncErrorCBOnBusyRegisterFailed, ///< registration of callback on busy failed PubCLMgrAsyncErrorCBRequestRegisterFailed, ///< registration of callback request failed PubCLMgrAsyncCBRequestRegisterSucceeded ///< registration of callback request succeeded } PubCLMgrAsyncMessages; /// /// possible line states typedef enum { PubLSNone=-1, PubLSInactive=0, ///< line is inactive PubLSHookOffInternal, ///< off hook, internal dialtone PubLSHookOffExternal, ///< off hook, external dialtone PubLSRinging, ///< incoming call, ringing PubLSDialing, ///< outgoing call, we are dialing, no sound PubLSAlerting, ///< outgoing call, alerting = ringing on destination PubLSKnocking, ///< outgoing call, knocking = second call ringing on destination PubLSBusy, ///< outgoing call, destination is busy PubLSActive, ///< incoming / outgoing call, logical and physical connection is established PubLSOnHold, ///< incoming / outgoing call, logical connection is established, destination gets music on hold PubLSConferenceActive, ///< incoming / outgoing conference, logical and physical connection is established PubLSConferenceOnHold, ///< incoming / outgoing conference, logical connection is established, not physcically connected PubLSTerminated, ///< incoming / outgoing connection / call has been disconnected PubLSTransferring, ///< special LSOnHold, call is awaiting to be transferred, peer gets special music on hold PubLSDisabled, ///< special LSInactive, wrap up time, we will temporary not allow calls on that line PubLSDirectCall, ///< incoming call, logical and physical connection is established, micro is muted PubLSWaitingForControlledDev } PubCLMgrLineStates; /// /// disconnect reasons, valid for line states PubLSBusy and PubLSTerminated typedef enum { PubSCl2DRNormal, ///< nothing special PubSCl2DRBusy, ///< peer was busy PubSCl2DRRejected, ///< peer rejected call PubSCl2DRCancelled, ///< call was cancelled PubSCl2DRTransferred, ///< call was transferred (connect to peers with "PubTransferCall") PubSCl2DRJoinedConference, ///< call was added to conference on other line with "PubJoinConference" PubSCl2DRNoAnswer, ///< peer did not pick up, timeout PubSCl2DRTooLate, ///< call was already picked up from other phone PubSCl2DRDirectCallImpossible, ///< direct call to peer was not allowed PubSCl2DRWrongNumber, ///< invalid number was dialed PubSCl2DRUnreachable, ///< destination is unreachable PubSCl2DRCallDiverted, ///< call was redirected PubSCl2DRCallRoutingFailed, ///< call routing failed, possible script error (script of peer) PubSCl2DRPermissionDenied, ///< permission for call was denied due to call restrictions (e.g. no long distance call allowed) PubSCl2DRNetworkCongestion, ///< no line available (within ISDN network) PubSCl2DRNoChannelAvailable, ///< no gateway channel available PubSCl2DRNumberChanged, ///< the number of the called party has changed PubSCl2DRIncompatibleDestination,///< the device type of the called party is incompatible PubSCl2DRBadAddressFormat, ///< wrong phone number format, e.g. bad character PubSCl2DRSecurityNegotiationFailed, ///< Incompatible encryption settings PubSCl2DRSubstituteNumberDenied ///< Own number not allowed } PubSCl2DiscReason; typedef enum { PubSCl3DRNormal, ///< nothing special PubSCl3DRBusy, ///< peer was busy PubSCl3DRRejected, ///< peer rejected call PubSCl3DRCancelled, ///< call was cancelled PubSCl3DRTransferred, ///< call was transferred (connect to peers with "PubTransferCall") PubSCl3DRJoinedConference, ///< call was added to conference on other line with "PubJoinConference" PubSCl3DRNoAnswer, ///< peer did not pick up, timeout PubSCl3DRTooLate, ///< call was already picked up from other phone PubSCl3DRDirectCallImpossible, ///< direct call to peer was not allowed PubSCl3DRWrongNumber, ///< invalid number was dialed PubSCl3DRUnreachable, ///< destination is unreachable PubSCl3DRCallDiverted, ///< call was redirected PubSCl3DRCallRoutingFailed, ///< call routing failed, possible script error (script of peer) PubSCl3DRPermissionDenied, ///< permission for call was denied due to call restrictions (e.g. no long distance call allowed) PubSCl3DRNetworkCongestion, ///< no line available (public ISDN network) PubSCl3DRNoChannelAvailable, ///< no gateway channel available PubSCl3DRNumberChanged, ///< number of destination has changed PubSCl3DRIncompatibleDestination, ///< destination is incompatible (compression) PubSCl3DRBadAddressFormat, ///< wrong phone number format, e.g. bad character PubSCl3DRSecurityNegotiationFailed, ///< Incompatible encryption settings PubSCl3DRSubstituteNumberDenied ///< Own number not allowed } PubSCl3DiscReason; /// /// speed dial signalling states typedef enum { PubSDUnknown=0, PubSDLoggedOut, PubSDLoggedIn, PubSDBusy, PubSDGroupCallNotification } PubCLMgrSpeedDialStates; typedef enum { CLMgrFileScope_User=1, CLMgrFileScope_Reserved1=2, CLMgrFileScope_Reserved2=4, CLMgrFileScope_Global=64, CLMgrFileScope_SystemDefault=128, CLMgrFileScope_GlobalOrSystemDefault=(64|128), CLMgrFileScope_ALL=2147483647, } CLMgrFileScope; typedef enum { CLMgrFileCategory_RingTones=0, CLMgrFileCategory_CallRoutingScripts=1, CLMgrFileCategory_Bitmaps=2, CLMgrFileCategory_Announcements=3, CLMgrFileCategory_HoldMusic=4, CLMgrFileCategory_SystemAnnouncements=5, CLMgrFileCategory_SampleAnnouncements=6, CLMgrFileCategory_CallRecordings=7, CLMgrFileCategory_Skins=8, CLMgrFileCategory_SampleScripts = 9, CLMgrFileCategory_FaxAttachments = 10, CLMgrFileCategory_FaxCoverPages = 11, CLMgrFileCategory_FaxCoverGraphics= 12, CLMgrFileCategory_FaxLetterhead = 13, CLMgrFileCategory_AvatarBitmaps = 14, CLMgrFileCategory_Other=0xffffffff } CLMgrFileCategory; /** * enum CLMgrAuthenticationMode */ typedef enum { CLMgrAuthenticationMode_None=0, ///< to be used for "SwyxIt! Now logon -> logon based on configured SIP accounts CLMgrAuthenticationMode_Password=1, ///< logon based on username & password; parameters will be used for database access and SIP logon CLMgrAuthenticationMode_WebServiceTrusted=2 ///< trusted logon for database, SIP logon parameters will be used from user profile } CLMgrAuthenticationMode; EXTERN_C const CLSID CLSID_ClientLineMgr; ///< GUID of client line manager EXTERN_C const CLSID CLSID_MemClientLineMgr; ///< GUID of client line manager EXTERN_C const CLSID CLSID_SClPBX; ///< GUID of PBX object on server EXTERN_C const IID LIBID_CLMGRLib; ///< GUID of client line managers type library EXTERN_C const IID LIBID_MEMCLMGRLib; ///< GUID of client line managers type library EXTERN_C const IID DIID_IClientLineMgrEventsDisp; ///< GUID of client line managers event interface (dispatch interface) #endif //_CLMGRPUBTYPES_H