Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
6.1 KiB

  1. /****************************************************************************
  2. *
  3. * $Archive: S:/STURGEON/SRC/Q931/VCS/hcall.h_v $
  4. *
  5. * INTEL Corporation Prorietary Information
  6. *
  7. * This listing is supplied under the terms of a license agreement
  8. * with INTEL Corporation and may not be copied nor disclosed except
  9. * in accordance with the terms of that agreement.
  10. *
  11. * Copyright (c) 1993-1996 Intel Corporation.
  12. *
  13. * $Revision: 1.27 $
  14. * $Date: 08 Jan 1997 18:04:32 $
  15. * $Author: EHOWARDX $
  16. *
  17. * Deliverable:
  18. *
  19. * Abstract:
  20. *
  21. * Call Object Methods
  22. *
  23. * Notes:
  24. *
  25. ***************************************************************************/
  26. #ifndef HCALL_H
  27. #define HCALL_H
  28. #include "av_asn1.h"
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. // Call Object states // OUT // IN
  33. #define CALLSTATE_NULL 0x00 // relcomp* // relcomp*
  34. #define CALLSTATE_INITIATED 0x01 // setup* //
  35. #define CALLSTATE_OUTGOING 0x03 // // proceeding*
  36. #define CALLSTATE_DELIVERED 0x04 // // alerting*
  37. #define CALLSTATE_PRESENT 0x06 // // setup*
  38. #define CALLSTATE_RECEIVED 0x07 // alerting* //
  39. #define CALLSTATE_CONNECT_REQUEST 0x08 // //
  40. #define CALLSTATE_INCOMING 0x09 // proceeding- //
  41. #define CALLSTATE_ACTIVE 0x0A // connect* // connect*
  42. // Call Timer limits
  43. #define Q931_TIMER_301 301
  44. #define Q931_TICKS_301 180000L // 3 minutes
  45. #define Q931_TIMER_303 303
  46. #define Q931_TICKS_303 4000L // 4 seconds
  47. typedef struct CALL_OBJECT_tag
  48. {
  49. HQ931CALL hQ931Call;
  50. WORD wCRV; // Call Reference Value (0..7FFF).
  51. DWORD_PTR dwListenToken;
  52. DWORD_PTR dwUserToken;
  53. Q931_CALLBACK Callback;
  54. BYTE bCallState;
  55. BOOL fIsCaller;
  56. DWORD dwPhysicalId;
  57. BOOL bResolved; // re-connect phase is over.
  58. BOOL bConnected; // has a live channel.
  59. CC_ADDR LocalAddr; // Local address on which channel is connected
  60. CC_ADDR PeerConnectAddr; // Address to which channel is connected
  61. CC_ADDR PeerCallAddr; // Address of opposite call end-point.
  62. BOOL PeerCallAddrPresent; // Address is present.
  63. CC_ADDR SourceAddr; // Address of this end-point.
  64. BOOL SourceAddrPresent; // Address is present.
  65. CC_CONFERENCEID ConferenceID;
  66. WORD wGoal;
  67. BOOL bCallerIsMC;
  68. WORD wCallType;
  69. BOOL NonStandardDataPresent;
  70. CC_NONSTANDARDDATA NonStandardData;
  71. char szDisplay[CC_MAX_DISPLAY_LENGTH];
  72. // length = 0 means not present.
  73. char szCalledPartyNumber[CC_MAX_PARTY_NUMBER_LEN];
  74. // length = 0 means not present.
  75. PCC_ALIASNAMES pCallerAliasList;
  76. PCC_ALIASNAMES pCalleeAliasList;
  77. PCC_ALIASNAMES pExtraAliasList;
  78. PCC_ALIASITEM pExtensionAliasItem;
  79. // these are part of EndpointType...
  80. BOOL VendorInfoPresent;
  81. CC_VENDORINFO VendorInfo;
  82. BYTE bufVendorProduct[CC_MAX_PRODUCT_LENGTH];
  83. BYTE bufVendorVersion[CC_MAX_VERSION_LENGTH];
  84. BOOL bIsTerminal;
  85. BOOL bIsGateway;
  86. ASN1_CODER_INFO World;
  87. DWORD dwTimerAlarm301;
  88. DWORD dwTimerAlarm303;
  89. GUID CallIdentifier;
  90. } CALL_OBJECT, *P_CALL_OBJECT, **PP_CALL_OBJECT;
  91. CS_STATUS CallListCreate();
  92. CS_STATUS CallListDestroy();
  93. CS_STATUS CallObjectCreate(
  94. PHQ931CALL phQ931Call,
  95. DWORD_PTR dwListenToken,
  96. DWORD_PTR dwUserToken,
  97. Q931_CALLBACK ConnectCallback,
  98. BOOL fIsCaller,
  99. CC_ADDR *pLocalAddr, // Local address on which channel is connected
  100. CC_ADDR *pPeerConnectAddr, // Address to which channel is connected
  101. CC_ADDR *pPeerCallAddr, // Address of opposite call end-point.
  102. CC_ADDR *pSourceAddr, // Address of this call end-point.
  103. CC_CONFERENCEID *pConferenceID,
  104. WORD wGoal,
  105. WORD wCallType,
  106. BOOL bCallerIsMC,
  107. char * pszDisplay,
  108. char * pszCalledPartyNumber,
  109. PCC_ALIASNAMES pCallerAliasList,
  110. PCC_ALIASNAMES pCalleeAliasList,
  111. PCC_ALIASNAMES pExtraAliasList,
  112. PCC_ALIASITEM pExtensionAliasItem,
  113. PCC_ENDPOINTTYPE pEndpointType,
  114. PCC_NONSTANDARDDATA pNonStandardData,
  115. WORD wCRV,
  116. LPGUID pCallIdentifier);
  117. CS_STATUS CallObjectDestroy(
  118. P_CALL_OBJECT pCallObject);
  119. CS_STATUS CallObjectLock(
  120. HQ931CALL hQ931Call,
  121. PP_CALL_OBJECT ppCallObject);
  122. CS_STATUS CallObjectUnlock(
  123. P_CALL_OBJECT pCallObject);
  124. CS_STATUS CallEntryUnlock(
  125. HQ931CALL hQ931Call);
  126. CS_STATUS CallObjectValidate(
  127. HQ931CALL hQ931Call);
  128. BOOL CallObjectFind(
  129. HQ931CALL *phQ931Call,
  130. WORD wCRV,
  131. PCC_ADDR pPeerAddr);
  132. CS_STATUS CallObjectMarkForDelete(
  133. HQ931CALL hQ931Call);
  134. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  135. // Timer Routines...
  136. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  137. void CallBackT301(P_CALL_OBJECT pCallObject);
  138. void CallBackT303(P_CALL_OBJECT pCallObject);
  139. void CALLBACK Q931TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);
  140. HRESULT Q931StartTimer(P_CALL_OBJECT pCallObject, DWORD wTimerId);
  141. HRESULT Q931StopTimer(P_CALL_OBJECT pCallObject, DWORD wTimerId);
  142. HRESULT Q931HangupPendingCalls(LPVOID context);
  143. #ifdef __cplusplus
  144. }
  145. #endif
  146. #endif HCALL_H
  147.