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.

117 lines
6.8 KiB

  1. /****************************************************************************/
  2. /* Header: acpcafn.h */
  3. /* */
  4. /* Purpose: Function prototypes for CPC API functions */
  5. /* */
  6. /* COPYRIGHT (c) Microsoft 1996-1999 */
  7. /****************************************************************************/
  8. void RDPCALL CPC_Init(void);
  9. void RDPCALL CPC_Term(void);
  10. void RDPCALL CPC_RegisterCapabilities(PTS_CAPABILITYHEADER pCapabilities,
  11. UINT16 sizeOfCaps);
  12. void RDPCALL CPC_EnumerateCapabilities(unsigned, UINT_PTR, PCAPSENUMERATEFN);
  13. void RDPCALL CPC_GetCombinedCapabilities(
  14. LOCALPERSONID localID,
  15. PUINT pSizeOfCaps,
  16. PTS_COMBINED_CAPABILITIES * ppCaps);
  17. void RDPCALL CPC_SetCombinedCapabilities(
  18. UINT cbSizeOfCaps,
  19. PTS_COMBINED_CAPABILITIES pCaps);
  20. BOOL RDPCALL CPC_PartyJoiningShare(LOCALPERSONID personID,
  21. unsigned oldShareSize,
  22. unsigned sizeOfCapsData,
  23. PVOID pCapsData );
  24. void RDPCALL CPC_PartyLeftShare(LOCALPERSONID personID,
  25. unsigned newShareSize);
  26. PTS_CAPABILITYHEADER RDPCALL CPCGetCapabilities(
  27. LOCALPERSONID localID,
  28. unsigned capabilitiesID);
  29. #ifdef __cplusplus
  30. /****************************************************************************/
  31. /* API FUNCTION: CPC_GetCapabilitiesForPerson */
  32. /* */
  33. /* Returns the capabilities for one person in the share. Components are */
  34. /* STRONGLY discouraged from using this function to cache pointers to */
  35. /* capabilities themselves. */
  36. /* */
  37. /* This function can return the capabilities for BOTH local and remote */
  38. /* parties. */
  39. /* */
  40. /* Use CPC_EnumerateCapabilities() if you need the capabilities of all */
  41. /* people in the share. */
  42. /* */
  43. /* Use CPC_GetCapabilitiesForPerson() when you need capabilities for only */
  44. /* ONE person in the share. */
  45. /* */
  46. /* Use CPC_GetCapabilitiesForLocalPerson() when you need the capabilities */
  47. /* for the local person and there is not be a share active. */
  48. /* */
  49. /* PARAMETERS: */
  50. /* personID - local personid for capabilities to query. */
  51. /* */
  52. /* capabilitiesID - the ID of the capabilities (group structure) to be */
  53. /* queried. */
  54. /* */
  55. /* RETURNS: */
  56. /* Pointer to a structure containing the capabilities ID, the size of the */
  57. /* capabilities, and any number of capability fields. The */
  58. /* values used in these fields should be non-zero. A zero in any */
  59. /* capability field is used to indicate that the capability is either */
  60. /* unknown or undefined by the remote. This pointer is ONLY valid while */
  61. /* the person is in the share. */
  62. /* */
  63. /* If the person has no capabilities with capabilitiesID, a NULL pointer is */
  64. /* returned. */
  65. /****************************************************************************/
  66. PTS_CAPABILITYHEADER RDPCALL SHCLASS CPC_GetCapabilitiesForPerson(
  67. LOCALPERSONID personID,
  68. unsigned capabilitiesID)
  69. {
  70. return CPCGetCapabilities(personID, capabilitiesID);
  71. }
  72. /****************************************************************************/
  73. /* API FUNCTION: CPC_GetCapabilitiesForLocalPerson() */
  74. /* */
  75. /* Returns the capabilities for the local person. This function can be */
  76. /* called when a share is not active. */
  77. /* */
  78. /* Use CPC_EnumerateCapabilities() if you need the capabilities of all */
  79. /* people in the share. */
  80. /* */
  81. /* Use CPC_GetCapabilitiesForPerson() when you need capabilities for only */
  82. /* ONE person in the share and you know a share is active. */
  83. /* */
  84. /* PARAMETERS: */
  85. /* capabilitiesID - the ID of the capabilities (group structure) to be */
  86. /* queried. */
  87. /* */
  88. /* RETURNS: */
  89. /* Pointer to a structure containing the capabilities ID, the size of the */
  90. /* capabilities, and any number of capability fields. */
  91. /* */
  92. /* If the local person has no capabilities with capabilitiesID, a NULL */
  93. /* pointer is returned. */
  94. /****************************************************************************/
  95. PTS_CAPABILITYHEADER RDPCALL SHCLASS CPC_GetCapabilitiesForLocalPerson(
  96. unsigned capabilitiesID)
  97. {
  98. return CPCGetCapabilities(0, capabilitiesID);
  99. }
  100. #endif // defined(__cplusplus)