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.

368 lines
10 KiB

  1. /*
  2. * conflist.h
  3. *
  4. * Copyright (c) 1995 by DataBeam Corporation, Lexington, KY
  5. *
  6. * Abstract:
  7. * This is the interface file for the class CConfDescriptorListContainer.
  8. * Instances of this class represent the Conference Descriptor list that is
  9. * generated by a call to GCCConferenceQueryRequest. This class hides most
  10. * of the complexity associated with building this list. It also handles
  11. * building the set of conference descriptors used in the
  12. * ConferenceQueryResponse PDU and the conference descriptor list passed
  13. * to the GCC interface. This class is designed so that a CControlSAP
  14. * object can use it to create a GCC_CONFERENCE_QUERY_CONFIRM message by
  15. * requesting a pointer to a list of Conference Descriptor pointers from
  16. * it. Objects of this type only live long enough to service a particular
  17. * query request. After a message callback has returned or a PDU has been
  18. * sent to MCS, the CConfDescriptorListContainer object is deleted.
  19. *
  20. * Caveats:
  21. * None.
  22. *
  23. * Author:
  24. * blp
  25. */
  26. #ifndef _CONFERENCE_DESCRIPTOR_LIST_
  27. #define _CONFERENCE_DESCRIPTOR_LIST_
  28. #include "netaddr.h"
  29. /*
  30. * This typedef defines the structure used internally by this class to maintain
  31. * the data associated with an individual conference descriptor.
  32. */
  33. typedef struct CONF_DESCRIPTOR
  34. {
  35. CONF_DESCRIPTOR(void);
  36. ~CONF_DESCRIPTOR(void);
  37. LPSTR pszNumericConfName;
  38. LPWSTR pwszTextConfName;
  39. LPSTR pszConfModifier;
  40. LPWSTR pwszConfDescription;
  41. CNetAddrListContainer *network_address_list;
  42. BOOL conference_is_locked;
  43. BOOL password_in_the_clear;
  44. }
  45. CONF_DESCRIPTOR;
  46. /*
  47. * These typedefs define the Rogue Wave container used to hold the list of
  48. * CONF_DESCRIPTOR structures internally and the iterator used for
  49. * accessing structures in the list.
  50. */
  51. class CConfDesccriptorList : public CList
  52. {
  53. DEFINE_CLIST(CConfDesccriptorList, CONF_DESCRIPTOR*)
  54. };
  55. /*
  56. * Class definition:
  57. */
  58. class CConfDescriptorListContainer : public CRefCount
  59. {
  60. public:
  61. CConfDescriptorListContainer(void);
  62. CConfDescriptorListContainer(PSetOfConferenceDescriptors, PGCCError);
  63. ~CConfDescriptorListContainer(void);
  64. GCCError AddConferenceDescriptorToList(
  65. LPSTR pszNumericConfName,
  66. LPWSTR conference_text_name,
  67. LPSTR pszConfModifier,
  68. BOOL locked_conference,
  69. BOOL password_in_the_clear,
  70. LPWSTR pwszConfDescription,
  71. CNetAddrListContainer *network_address_list);
  72. GCCError GetConferenceDescriptorListPDU(PSetOfConferenceDescriptors *);
  73. void FreeConferenceDescriptorListPDU(void);
  74. GCCError LockConferenceDescriptorList(void);
  75. void UnLockConferenceDescriptorList(void);
  76. void GetConferenceDescriptorList(PGCCConferenceDescriptor **, UINT *pcDescriptors);
  77. private:
  78. void GetConferenceDescriptor(PGCCConferenceDescriptor, CONF_DESCRIPTOR *);
  79. private:
  80. /*
  81. * Instance variables:
  82. */
  83. PGCCConferenceDescriptor * m_ppGCCConfDescriptorList;
  84. PSetOfConferenceDescriptors m_pSetOfConfDescriptors;
  85. UINT m_cDescriptors;
  86. LPBYTE m_pDescriptorListMemory;
  87. CConfDesccriptorList m_ConfDescriptorList;
  88. //
  89. // LONCHANC: m_pNetAddrMemoryPointer points to available space,
  90. // initially equaling to m_pNetAddrListMemory.
  91. //
  92. LPBYTE m_pNetAddrListMemory;
  93. LPBYTE m_pNetAddrMemoryPointer;
  94. };
  95. /*
  96. * Comments explaining the public and private class member functions
  97. */
  98. /*
  99. * CConfDescriptorListContainer ();
  100. *
  101. * Public member function of CConfDescriptorListContainer.
  102. *
  103. * Function Description:
  104. * This is a constructor for the CConfDescriptorListContainer class. It
  105. * initializes instance variables.
  106. *
  107. * Formal Parameters:
  108. *
  109. * Return Value:
  110. * None.
  111. *
  112. * Side Effects:
  113. * None.
  114. *
  115. * Caveats:
  116. * None.
  117. */
  118. /*
  119. * CConfDescriptorListContainer ( PSetOfConferenceDescriptors conference_list,
  120. * PGCCError gcc_error);
  121. *
  122. * Public member function of CConfDescriptorListContainer.
  123. *
  124. * Function Description:
  125. * This is a constructor for the CConfDescriptorListContainer class.
  126. * This constructor builds a list of conference descriptors that can
  127. * be passed on to the GCC interface. This list is built from a set
  128. * of conference descriptors which is part of a Query Response PDU.
  129. *
  130. * Formal Parameters:
  131. * conference_list (i) The PDU form of the descriptor list.
  132. * gcc_error (o) Error return parameter.
  133. *
  134. * Return Value:
  135. * GCC_NO_ERROR - No error.
  136. * GCC_ALLOCATION_FAILURE - Error creating an object using the
  137. * "new" operator.
  138. *
  139. * Side Effects:
  140. * None.
  141. *
  142. * Caveats:
  143. * None.
  144. */
  145. /*
  146. * ~CConfDescriptorListContainer ();
  147. *
  148. * Public member function of CConfDescriptorListContainer.
  149. *
  150. * Function Description:
  151. * This is the destructor for the CConfDescriptorListContainer class. It is
  152. * responsible for freeing up any resources allocated during the life of
  153. * this object.
  154. *
  155. * Formal Parameters:
  156. * None.
  157. *
  158. * Return Value:
  159. * None.
  160. *
  161. * Side Effects:
  162. * None.
  163. *
  164. * Caveats:
  165. * None.
  166. */
  167. /*
  168. * GCCError AddConferenceDescriptorToList (
  169. * LPSTR pszNumericConfName,
  170. * LPWSTR conference_text_name,
  171. * LPSTR pszConfModifier,
  172. * BOOL locked_conference,
  173. * BOOL password_in_the_clear,
  174. * LPWSTR pwszConfDescription,
  175. * CNetAddrListContainer *network_address_list);
  176. *
  177. * Public member function of CConfDescriptorListContainer.
  178. *
  179. * Function Description:
  180. * This routine is used to add a single new conference descriptor to the
  181. * list of conference descriptors.
  182. *
  183. * Formal Parameters:
  184. * conference_numeric_name (i) The numeric form of the conference name.
  185. * conference_text_name (i) The text form of the conference name.
  186. * pszConfModifier (i) The conference modifier string.
  187. * locked_conference (i) Flag indicating whether or not the
  188. * conference is locked.
  189. * password_in_the_clear (i) Flag indicating whether the conference
  190. * password is "clear" or is a
  191. * "challenge".
  192. * pwszConfDescription (i) The conference description string.
  193. * network_address_list (i) List of network addresses at the queried
  194. * node.
  195. *
  196. * Return Value:
  197. * GCC_NO_ERROR - No error.
  198. * GCC_ALLOCATION_FAILURE - Error creating an object using the
  199. * "new" operator.
  200. *
  201. * Side Effects:
  202. * None.
  203. *
  204. * Caveats:
  205. * None.
  206. */
  207. /*
  208. * GCCError GetConferenceDescriptorListPDU (
  209. * PSetOfConferenceDescriptors * conference_list);
  210. *
  211. * Public member function of CConfDescriptorListContainer.
  212. *
  213. * Function Description:
  214. * This routine is used to retrieve the PDU form of the conference
  215. * descriptor list which is a list of "SetOfConferenceDescriptors"
  216. * structures.
  217. *
  218. * Formal Parameters:
  219. * conference_list (o) The pointer to the list of
  220. * "SetOfConferenceDescriptors" structures
  221. * to fill in.
  222. *
  223. * Return Value:
  224. * GCC_NO_ERROR - No error.
  225. * GCC_ALLOCATION_FAILURE - Error creating an object using the
  226. * "new" operator.
  227. *
  228. * Side Effects:
  229. * None.
  230. *
  231. * Caveats:
  232. * None.
  233. */
  234. /*
  235. * void FreeConferenceDescriptorListPDU ();
  236. *
  237. * Public member function of CConfDescriptorListContainer.
  238. *
  239. * Function Description:
  240. * This routine is used to free up any resources allocated to hold the PDU
  241. * form of the conference descriptor list.
  242. *
  243. * Formal Parameters:
  244. * None.
  245. *
  246. * Return Value:
  247. * None.
  248. *
  249. * Side Effects:
  250. * None.
  251. *
  252. * Caveats:
  253. * None.
  254. */
  255. /*
  256. * GCCError LockConferenceDescriptorList ();
  257. *
  258. * Public member function of CConfDescriptorListContainer.
  259. *
  260. * Function Description:
  261. * This routine is used to "lock" the API form of the conference descriptor
  262. * list. The lock count is incremented and the API form of the list
  263. * created in preparation for a "GetConferenceDescriptorList" call used to
  264. * retrieve the API form of the list. The memory necessary to hold the
  265. * API list is allocated by this routine.
  266. *
  267. * Formal Parameters:
  268. * None.
  269. *
  270. * Return Value:
  271. * GCC_NO_ERROR - No error.
  272. * GCC_ALLOCATION_FAILURE - Error creating an object using the "new"
  273. * operator or else an allocation using
  274. * the memory manager failed.
  275. *
  276. * Side Effects:
  277. * The internal lock count is incremented.
  278. *
  279. * Caveats:
  280. * None.
  281. */
  282. /*
  283. * void GetConferenceDescriptorList (
  284. * PGCCConferenceDescriptor ** conference_list,
  285. * UINT* number_of_descriptors);
  286. *
  287. * Public member function of CConfDescriptorListContainer.
  288. *
  289. * Function Description:
  290. * This routine is used to retrieve the API form of the conference
  291. * descriptor list.
  292. *
  293. * Formal Parameters:
  294. * conference_list (o) Pointer to list of GCCConferenceDescriptor
  295. * API structures to fill in.
  296. * number_of_descriptors (o) Pointer to the number of descriptors in the
  297. * list to fill in.
  298. *
  299. * Return Value:
  300. * None.
  301. *
  302. * Side Effects:
  303. * None.
  304. *
  305. * Caveats:
  306. * None.
  307. */
  308. /*
  309. * void UnLockConferenceDescriptorList ();
  310. *
  311. * Public member function of CConfDescriptorListContainer.
  312. *
  313. * Function Description:
  314. * This routine is used to "unlock" the "API" data for this object. This
  315. * results in the lock count for this object being decremented. When the
  316. * lock count transitions from 1 to 0, a check is made to determine
  317. * whether the object has been freed through a call to
  318. * FreeConferenceDescriptorList. If so, the object will automatically
  319. * delete itself. If not, any resources allocated to hold the API form
  320. * of the decriptor list are freed.
  321. *
  322. * Formal Parameters:
  323. * None.
  324. *
  325. * Return Value:
  326. * None.
  327. *
  328. * Side Effects:
  329. * The internal lock count is decremented.
  330. *
  331. * Caveats:
  332. * None.
  333. */
  334. #endif