Source code of Windows XP (NT5)
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.

105 lines
3.3 KiB

  1. /***************************************************************************/
  2. /** Microsoft Windows **/
  3. /** Copyright(c) Microsoft Corp., 1995-1996 **/
  4. /***************************************************************************/
  5. /****************************************************************************
  6. cuserdta.hpp
  7. June 96 LenS
  8. T120 user data/object ID infrastructure.
  9. ****************************************************************************/
  10. #ifndef USERDATA_INC
  11. #define USERDATA_INC
  12. #include <oblist.h>
  13. #include <confdbg.h>
  14. #include <confguid.h>
  15. // H.221 utility functions
  16. VOID CreateH221AppKeyFromGuid(LPBYTE lpb, GUID * pguid);
  17. BOOL GetGuidFromH221AppKey(LPTSTR pszGuid, LPOSTR pOctStr);
  18. // GetUserData extracts user data from a T120 event message.
  19. // The caller passes in the T120 data structures and the GUID
  20. // associated with the user data, and receives back a pointer to
  21. // the buffer containing the user data.
  22. // This buffer will be invalidated by the user returning from
  23. // the event. If the user data consisted just
  24. // of the GUID, then *pnData == NULL and *ppData == NULL.
  25. HRESULT GetUserData(UINT nRecords,
  26. GCCUserData ** ppUserData,
  27. GUID * pGUID,
  28. UINT * pnData,
  29. PVOID * ppData);
  30. /*************************************************************************
  31. NAME: USER_DATA
  32. SYNOPSIS: This class is used internally by the Node Controller to
  33. contruct a user data list. Each entry is GUID based with
  34. binary data following that is uninterpreted by the
  35. Node Controller and T120.
  36. INTERFACE: USER_DATA(object ID)
  37. Construct the container for the list.
  38. ~USER_DATA_GUID()
  39. Destructor automatically releases data allocated.
  40. AddUserData()
  41. Add some user data to the list, keyed by a unique
  42. GUID. If the GUID is already in the list, then its
  43. data will be overwritten.
  44. GetUserData()
  45. Used in conjunction with GetNumUserData() to put the
  46. user data into a T120 request.
  47. GetNumUserData()
  48. See GetUserData().
  49. PARENT: None
  50. USES: None
  51. CAVEATS: 1) The user data binary information must fit in an unsigned
  52. short field, less the bytes for the GUID header and byte count.
  53. NOTES: None.
  54. HISTORY:
  55. 06/04/96 lens Created
  56. **************************************************************************/
  57. class CNCUserDataList : private CList
  58. {
  59. public:
  60. CNCUserDataList(void);
  61. ~CNCUserDataList(void);
  62. HRESULT AddUserData(GUID * pGUID, UINT nData, PVOID pData);
  63. HRESULT GetUserDataList(UINT * pnRecords, GCCUserData *** pppUserData);
  64. GCCUserData **GetUserData(void);
  65. GCCUserData *GetUserGUIDData(GUID * pGUID);
  66. void DeleteEntry(GUID * pGUID);
  67. private:
  68. BOOL Append(GCCUserData* pData) { return CList::Append((LPVOID) pData); }
  69. BOOL Remove(GCCUserData* pData) { return CList::Remove((LPVOID) pData); }
  70. GCCUserData* Iterate(void) { return (GCCUserData*) CList::Iterate(); }
  71. GCCUserData ** m_apUserData;
  72. };
  73. #endif /* ndef USERDATA_INC */