libUPnP  1.6.17
Typedefs | Functions | Variables
client_table.h File Reference
#include "service_table.h"
#include "upnp.h"
#include "UpnpString.h"
#include "upnp_timeout.h"
#include "uri.h"
#include "TimerThread.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Include dependency graph for client_table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct s_ClientSubscription ClientSubscription
 

Functions

ClientSubscription * UpnpClientSubscription_new ()
 Constructor. More...
 
void UpnpClientSubscription_delete (ClientSubscription *p)
 Destructor. More...
 
ClientSubscription * UpnpClientSubscription_dup (const ClientSubscription *p)
 Copy Constructor. More...
 
void UpnpClientSubscription_assign (ClientSubscription *q, const ClientSubscription *p)
 Assignment operator. More...
 
int UpnpClientSubscription_get_RenewEventId (const ClientSubscription *p)
 
void UpnpClientSubscription_set_RenewEventId (ClientSubscription *p, int n)
 
const UpnpStringUpnpClientSubscription_get_SID (const ClientSubscription *p)
 
void UpnpClientSubscription_set_SID (ClientSubscription *p, const UpnpString *s)
 
void UpnpClientSubscription_strcpy_SID (ClientSubscription *p, const char *s)
 
const UpnpStringUpnpClientSubscription_get_ActualSID (const ClientSubscription *p)
 
void UpnpClientSubscription_set_ActualSID (ClientSubscription *p, const UpnpString *s)
 
void UpnpClientSubscription_strcpy_ActualSID (ClientSubscription *p, const char *s)
 
const UpnpStringUpnpClientSubscription_get_EventURL (const ClientSubscription *p)
 
void UpnpClientSubscription_set_EventURL (ClientSubscription *p, const UpnpString *s)
 
void UpnpClientSubscription_strcpy_EventURL (ClientSubscription *p, const char *s)
 
ClientSubscription * UpnpClientSubscription_get_Next (const ClientSubscription *p)
 
void UpnpClientSubscription_set_Next (ClientSubscription *p, ClientSubscription *q)
 
void free_client_subscription (ClientSubscription *sub)
 Free memory allocated for client subscription data. More...
 
void freeClientSubList (ClientSubscription *list)
 Free the client subscription table. More...
 
void RemoveClientSubClientSID (ClientSubscription **head, const UpnpString *sid)
 Remove the client subscription matching the subscritpion id represented by the const Upnp_SID sid parameter from the table and update the table. More...
 
ClientSubscription * GetClientSubClientSID (ClientSubscription *head, const UpnpString *sid)
 Return the client subscription from the client table that matches const Upnp_SID sid subscrition id value. More...
 
ClientSubscription * GetClientSubActualSID (ClientSubscription *head, token *sid)
 Returns the client subscription from the client subscription table that has the matching token *sid buffer value. More...
 

Variables

TimerThread gTimerThread
 

Function Documentation

void free_client_subscription ( ClientSubscription *  sub)

Free memory allocated for client subscription data.

Remove timer thread associated with this subscription event.

Parameters
[in]subClient subscription to be freed.

References free_upnp_timeout(), gTimerThread, TimerThreadRemove(), UpnpClientSubscription_get_RenewEventId(), UpnpClientSubscription_set_RenewEventId(), UpnpClientSubscription_strcpy_ActualSID(), and UpnpClientSubscription_strcpy_EventURL().

Referenced by freeClientSubList(), genaRenewSubscription(), genaUnregisterClient(), and genaUnSubscribe().

void freeClientSubList ( ClientSubscription *  list)

Free the client subscription table.

Parameters
[in]listClient subscription list to be freed.

References free_client_subscription(), UpnpClientSubscription_delete(), and UpnpClientSubscription_get_Next().

Referenced by genaUnregisterClient(), and RemoveClientSubClientSID().

ClientSubscription* GetClientSubActualSID ( ClientSubscription *  head,
token sid 
)

Returns the client subscription from the client subscription table that has the matching token *sid buffer value.

Returns
The matching subscription.
Parameters
[in]headHead of the subscription list.
[in]sidSubscription ID to be mactched.

References UpnpClientSubscription_get_Next().

Referenced by gena_process_notification_event().

ClientSubscription* GetClientSubClientSID ( ClientSubscription *  head,
const UpnpString sid 
)

Return the client subscription from the client table that matches const Upnp_SID sid subscrition id value.

Returns
The matching subscription.
Parameters
[in]headHead of the subscription list.
[in]sidSubscription ID to be mactched.

References UpnpClientSubscription_get_Next(), and UpnpString_get_String().

Referenced by genaRenewSubscription(), and genaUnSubscribe().

void RemoveClientSubClientSID ( ClientSubscription **  head,
const UpnpString sid 
)

Remove the client subscription matching the subscritpion id represented by the const Upnp_SID sid parameter from the table and update the table.

Parameters
[in]headHead of the subscription list.
[in]sidSubscription ID to be mactched.

References freeClientSubList(), UpnpClientSubscription_get_Next(), UpnpClientSubscription_set_Next(), and UpnpString_get_String().

Referenced by genaRenewSubscription(), genaUnregisterClient(), and genaUnSubscribe().

void UpnpClientSubscription_assign ( ClientSubscription *  q,
const ClientSubscription *  p 
)
void UpnpClientSubscription_delete ( ClientSubscription *  p)

Destructor.

Destructor

Parameters
[in]pThe this pointer.

References UpnpString_delete().

Referenced by freeClientSubList(), genaRenewSubscription(), genaSubscribe(), genaUnregisterClient(), and genaUnSubscribe().

ClientSubscription* UpnpClientSubscription_dup ( const ClientSubscription *  p)

Copy Constructor.

Copy Constructor

Parameters
[in]pThe this pointer.

References UpnpClientSubscription_assign(), and UpnpClientSubscription_new().

const UpnpString* UpnpClientSubscription_get_ActualSID ( const ClientSubscription *  p)
const UpnpString* UpnpClientSubscription_get_EventURL ( const ClientSubscription *  p)
ClientSubscription* UpnpClientSubscription_get_Next ( const ClientSubscription *  p)
Parameters
[in]pThe this pointer.

Referenced by freeClientSubList(), GetClientSubActualSID(), GetClientSubClientSID(), and RemoveClientSubClientSID().

int UpnpClientSubscription_get_RenewEventId ( const ClientSubscription *  p)
Parameters
[in]pThe this pointer.

Referenced by free_client_subscription(), and genaRenewSubscription().

const UpnpString* UpnpClientSubscription_get_SID ( const ClientSubscription *  p)
ClientSubscription* UpnpClientSubscription_new ( )
void UpnpClientSubscription_set_ActualSID ( ClientSubscription *  p,
const UpnpString s 
)
Parameters
[in]pThe this pointer.

References UpnpString_delete(), and UpnpString_dup().

Referenced by genaRenewSubscription(), genaSubscribe(), and UpnpClientSubscription_assign().

void UpnpClientSubscription_set_EventURL ( ClientSubscription *  p,
const UpnpString s 
)
Parameters
[in]pThe this pointer.

References UpnpString_delete(), and UpnpString_dup().

Referenced by genaSubscribe(), and UpnpClientSubscription_assign().

void UpnpClientSubscription_set_Next ( ClientSubscription *  p,
ClientSubscription *  q 
)
Parameters
[in]pThe this pointer.

Referenced by genaSubscribe(), and RemoveClientSubClientSID().

void UpnpClientSubscription_set_RenewEventId ( ClientSubscription *  p,
int  n 
)
Parameters
[in]pThe this pointer.
[in]n.

Referenced by free_client_subscription(), genaRenewSubscription(), genaSubscribe(), and ScheduleGenaAutoRenew().

void UpnpClientSubscription_set_SID ( ClientSubscription *  p,
const UpnpString s 
)
Parameters
[in]pThe this pointer.

References UpnpString_delete(), and UpnpString_dup().

Referenced by genaSubscribe(), and UpnpClientSubscription_assign().

void UpnpClientSubscription_strcpy_ActualSID ( ClientSubscription *  p,
const char *  s 
)
Parameters
[in]pThe this pointer.

References UpnpString_delete(), UpnpString_new(), and UpnpString_set_String().

Referenced by free_client_subscription().

void UpnpClientSubscription_strcpy_EventURL ( ClientSubscription *  p,
const char *  s 
)
Parameters
[in]pThe this pointer.

References UpnpString_delete(), UpnpString_new(), and UpnpString_set_String().

Referenced by free_client_subscription().

void UpnpClientSubscription_strcpy_SID ( ClientSubscription *  p,
const char *  s 
)
Parameters
[in]pThe this pointer.

References UpnpString_delete(), UpnpString_new(), and UpnpString_set_String().