client_table.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. #ifndef CLIENT_TABLE_H
  2. #define CLIENT_TABLE_H
  3. /*!
  4. * \file
  5. */
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #include "service_table.h"
  10. #include "upnp.h"
  11. #include "UpnpString.h"
  12. #include "upnp_timeout.h"
  13. #include "uri.h"
  14. #include "TimerThread.h"
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17. #include <time.h>
  18. extern TimerThread gTimerThread;
  19. #ifdef INCLUDE_CLIENT_APIS
  20. typedef struct s_ClientSubscription ClientSubscription;
  21. /*!
  22. * \brief Constructor.
  23. */
  24. ClientSubscription *UpnpClientSubscription_new();
  25. /*!
  26. * \brief Destructor.
  27. */
  28. void UpnpClientSubscription_delete(
  29. /*! [in] The \b this pointer. */
  30. ClientSubscription *p);
  31. /*!
  32. * \brief Copy Constructor.
  33. */
  34. ClientSubscription *UpnpClientSubscription_dup(
  35. /*! [in] The \b this pointer. */
  36. const ClientSubscription *p);
  37. /*!
  38. * \brief Assignment operator.
  39. */
  40. void UpnpClientSubscription_assign(
  41. /*! [in] The \b this pointer. */
  42. ClientSubscription *q,
  43. const ClientSubscription *p);
  44. /*!
  45. * \brief
  46. */
  47. int UpnpClientSubscription_get_RenewEventId(
  48. /*! [in] The \b this pointer. */
  49. const ClientSubscription *p);
  50. /*!
  51. * \brief
  52. */
  53. void UpnpClientSubscription_set_RenewEventId(
  54. /*! [in] The \b this pointer. */
  55. ClientSubscription *p,
  56. /*! [in] . */
  57. int n);
  58. /*!
  59. * \brief
  60. */
  61. const UpnpString *UpnpClientSubscription_get_SID(
  62. /*! [in] The \b this pointer. */
  63. const ClientSubscription *p);
  64. /*!
  65. * \brief
  66. */
  67. void UpnpClientSubscription_set_SID(
  68. /*! [in] The \b this pointer. */
  69. ClientSubscription *p,
  70. const UpnpString *s);
  71. /*!
  72. * \brief
  73. */
  74. void UpnpClientSubscription_strcpy_SID(
  75. /*! [in] The \b this pointer. */
  76. ClientSubscription *p,
  77. const char *s);
  78. /*!
  79. * \brief
  80. */
  81. const UpnpString *UpnpClientSubscription_get_ActualSID(
  82. /*! [in] The \b this pointer. */
  83. const ClientSubscription *p);
  84. /*!
  85. * \brief
  86. */
  87. void UpnpClientSubscription_set_ActualSID(
  88. /*! [in] The \b this pointer. */
  89. ClientSubscription *p,
  90. const UpnpString *s);
  91. /*!
  92. * \brief
  93. */
  94. void UpnpClientSubscription_strcpy_ActualSID(
  95. /*! [in] The \b this pointer. */
  96. ClientSubscription *p,
  97. const char *s);
  98. /*!
  99. * \brief
  100. */
  101. const UpnpString *UpnpClientSubscription_get_EventURL(
  102. /*! [in] The \b this pointer. */
  103. const ClientSubscription *p);
  104. /*!
  105. * \brief
  106. */
  107. void UpnpClientSubscription_set_EventURL(
  108. /*! [in] The \b this pointer. */
  109. ClientSubscription *p,
  110. const UpnpString *s);
  111. /*!
  112. * \brief
  113. */
  114. void UpnpClientSubscription_strcpy_EventURL(
  115. /*! [in] The \b this pointer. */
  116. ClientSubscription *p,
  117. const char *s);
  118. /*!
  119. * \brief
  120. */
  121. ClientSubscription *UpnpClientSubscription_get_Next(
  122. /*! [in] The \b this pointer. */
  123. const ClientSubscription *p);
  124. /*!
  125. * \brief
  126. */
  127. void UpnpClientSubscription_set_Next(
  128. /*! [in] The \b this pointer. */
  129. ClientSubscription *p,
  130. ClientSubscription *q);
  131. /*!
  132. * \brief Free memory allocated for client subscription data.
  133. *
  134. * Remove timer thread associated with this subscription event.
  135. */
  136. void free_client_subscription(
  137. /*! [in] Client subscription to be freed. */
  138. ClientSubscription *sub);
  139. /*!
  140. * \brief Free the client subscription table.
  141. */
  142. void freeClientSubList(
  143. /*! [in] Client subscription list to be freed. */
  144. ClientSubscription *list);
  145. /*!
  146. * \brief Remove the client subscription matching the subscritpion id
  147. * represented by the const Upnp_SID sid parameter from the table and
  148. * update the table.
  149. */
  150. void RemoveClientSubClientSID(
  151. /*! [in] Head of the subscription list. */
  152. ClientSubscription **head,
  153. /*! [in] Subscription ID to be mactched. */
  154. const UpnpString *sid);
  155. /*!
  156. * \brief Return the client subscription from the client table that matches
  157. * const Upnp_SID sid subscrition id value.
  158. *
  159. * \return The matching subscription.
  160. */
  161. ClientSubscription *GetClientSubClientSID(
  162. /*! [in] Head of the subscription list. */
  163. ClientSubscription *head,
  164. /*! [in] Subscription ID to be mactched. */
  165. const UpnpString *sid);
  166. /*!
  167. * \brief Returns the client subscription from the client subscription table
  168. * that has the matching token *sid buffer value.
  169. *
  170. * \return The matching subscription.
  171. */
  172. ClientSubscription *GetClientSubActualSID(
  173. /*! [in] Head of the subscription list. */
  174. ClientSubscription *head,
  175. /*! [in] Subscription ID to be mactched. */
  176. token *sid);
  177. #endif /* INCLUDE_CLIENT_APIS */
  178. #ifdef __cplusplus
  179. }
  180. #endif /* __cplusplus */
  181. #endif /* CLIENT_TABLE_H */