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.

134 lines
7.6 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. Copyright 2006 - 2011 Intel Corporation
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #ifndef __RNDControlPoint__
  14. #define __RNDControlPoint__
  15. struct UPnPDevice
  16. {
  17. void* CP;
  18. char* DeviceType;
  19. char* UDN;
  20. char* LocationURL;
  21. char* PresentationURL;
  22. char* FriendlyName;
  23. char* ManufacturerName;
  24. char* ManufacturerURL;
  25. char* ModelName;
  26. char* ModelDescription;
  27. char* ModelNumber;
  28. char* ModelURL;
  29. int SCPDLeft;
  30. int ReferenceCount;
  31. char* InterfaceToHost;
  32. int CacheTime;
  33. void *Tag;
  34. struct UPnPDevice *Parent;
  35. struct UPnPDevice *EmbeddedDevices;
  36. struct UPnPService *Services;
  37. struct UPnPDevice *Next;
  38. };
  39. struct UPnPService
  40. {
  41. char* ServiceType;
  42. char* ServiceId;
  43. char* ControlURL;
  44. char* SubscriptionURL;
  45. char* SCPDURL;
  46. char* SubscriptionID;
  47. struct UPnPAction *Actions;
  48. struct UPnPStateVariable *Variables;
  49. struct UPnPDevice *Parent;
  50. struct UPnPService *Next;
  51. };
  52. struct UPnPStateVariable
  53. {
  54. struct UPnPStateVariable *Next;
  55. struct UPnPService *Parent;
  56. char* Name;
  57. char **AllowedValues;
  58. int NumAllowedValues;
  59. char* Min;
  60. char* Max;
  61. char* Step;
  62. };
  63. struct UPnPAction
  64. {
  65. char* Name;
  66. struct UPnPAction *Next;
  67. };
  68. struct UPnPAllowedValue
  69. {
  70. struct UPnPAllowedValue *Next;
  71. char* Value;
  72. };
  73. void RNDAddRef(struct UPnPDevice *device);
  74. void RNDRelease(struct UPnPDevice *device);
  75. struct UPnPDevice* RNDGetDevice1(struct UPnPDevice *device,int index);
  76. int RNDGetDeviceCount(struct UPnPDevice *device);
  77. void PrintUPnPDevice(int indents, struct UPnPDevice *device);
  78. void *RNDCreateControlPoint(void *Chain, void(*A)(struct UPnPDevice*),void(*R)(struct UPnPDevice*));
  79. void RND_CP_IPAddressListChanged(void *CPToken);
  80. struct UPnPDevice* RNDGetDevice(struct UPnPDevice *device, char* DeviceType, int number);
  81. int RNDHasAction(struct UPnPService *s, char* action);
  82. void RNDSubscribeForUPnPEvents(struct UPnPService *service, void(*callbackPtr)(struct UPnPService* service,int OK));
  83. struct UPnPService *RNDGetService(struct UPnPDevice *device, char* ServiceName, int length);
  84. struct UPnPService *RNDGetService_ContentDirectory(struct UPnPDevice *device);
  85. struct UPnPService *RNDGetService_ConnectionManager(struct UPnPDevice *device);
  86. extern void (*RNDEventCallback_ContentDirectory_TransferIDs)(struct UPnPService* Service,char* TransferIDs);
  87. extern void (*RNDEventCallback_ContentDirectory_ContainerUpdateIDs)(struct UPnPService* Service,char* ContainerUpdateIDs);
  88. extern void (*RNDEventCallback_ContentDirectory_SystemUpdateID)(struct UPnPService* Service,unsigned int SystemUpdateID);
  89. extern void (*RNDEventCallback_ConnectionManager_SourceProtocolInfo)(struct UPnPService* Service,char* SourceProtocolInfo);
  90. extern void (*RNDEventCallback_ConnectionManager_SinkProtocolInfo)(struct UPnPService* Service,char* SinkProtocolInfo);
  91. extern void (*RNDEventCallback_ConnectionManager_CurrentConnectionIDs)(struct UPnPService* Service,char* CurrentConnectionIDs);
  92. void RNDInvoke_ContentDirectory_Search(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* Result,unsigned int NumberReturned,unsigned int TotalMatches,unsigned int UpdateID),void* _user, char* ContainerID, char* SearchCriteria, char* Filter, unsigned int StartingIndex, unsigned int RequestedCount, char* SortCriteria);
  93. void RNDInvoke_ContentDirectory_StopTransferResource(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user),void* _user, unsigned int TransferID);
  94. void RNDInvoke_ContentDirectory_DestroyObject(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user),void* _user, char* ObjectID);
  95. void RNDInvoke_ContentDirectory_UpdateObject(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user),void* _user, char* ObjectID, char* CurrentTagValue, char* NewTagValue);
  96. void RNDInvoke_ContentDirectory_ExportResource(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,unsigned int TransferID),void* _user, char* SourceURI, char* DestinationURI);
  97. void RNDInvoke_ContentDirectory_GetTransferProgress(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* TransferStatus,char* TransferLength,char* TransferTotal),void* _user, unsigned int TransferID);
  98. void RNDInvoke_ContentDirectory_GetSearchCapabilities(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* SearchCaps),void* _user);
  99. void RNDInvoke_ContentDirectory_GetSystemUpdateID(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,unsigned int Id),void* _user);
  100. void RNDInvoke_ContentDirectory_CreateObject(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* ObjectID,char* Result),void* _user, char* ContainerID, char* Elements);
  101. void RNDInvoke_ContentDirectory_GetSortCapabilities(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* SortCaps),void* _user);
  102. void RNDInvoke_ContentDirectory_Browse(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* Result,unsigned int NumberReturned,unsigned int TotalMatches,unsigned int UpdateID),void* _user, char* ObjectID, char* BrowseFlag, char* Filter, unsigned int StartingIndex, unsigned int RequestedCount, char* SortCriteria);
  103. void RNDInvoke_ContentDirectory_ImportResource(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,unsigned int TransferID),void* _user, char* SourceURI, char* DestinationURI);
  104. void RNDInvoke_ContentDirectory_CreateReference(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* NewID),void* _user, char* ContainerID, char* ObjectID);
  105. void RNDInvoke_ContentDirectory_DeleteResource(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user),void* _user, char* ResourceURI);
  106. void RNDInvoke_ConnectionManager_GetCurrentConnectionInfo(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,int RcsID,int AVTransportID,char* ProtocolInfo,char* PeerConnectionManager,int PeerConnectionID,char* Direction,char* Status),void* _user, int ConnectionID);
  107. void RNDInvoke_ConnectionManager_PrepareForConnection(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,int ConnectionID,int AVTransportID,int RcsID),void* _user, char* RemoteProtocolInfo, char* PeerConnectionManager, int PeerConnectionID, char* Direction);
  108. void RNDInvoke_ConnectionManager_ConnectionComplete(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user),void* _user, int ConnectionID);
  109. void RNDInvoke_ConnectionManager_GetProtocolInfo(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* Source,char* Sink),void* _user);
  110. void RNDInvoke_ConnectionManager_GetCurrentConnectionIDs(struct UPnPService *service, void (*CallbackPtr)(struct UPnPService*,int ErrorCode,void *user,char* ConnectionIDs),void* _user);
  111. #endif