libUPnP
1.6.17
|
Implements string operations in the UPnP library. More...
Data Structures | |
struct | SUpnpString |
Internal implementation of the class UpnpString. More... | |
Files | |
file | UpnpString.h |
UpnpString object declaration. | |
file | UpnpString.c |
UpnpString object implementation. | |
Typedefs | |
typedef struct s_UpnpString | UpnpString |
Type of the string objects inside libupnp. | |
Functions | |
UpnpString * | UpnpString_new () |
Constructor. | |
void | UpnpString_delete (UpnpString *p) |
Destructor. | |
UpnpString * | UpnpString_dup (const UpnpString *p) |
Copy Constructor. | |
void | UpnpString_assign (UpnpString *p, const UpnpString *q) |
Assignment operator. | |
size_t | UpnpString_get_Length (const UpnpString *p) |
Returns the length of the string. | |
void | UpnpString_set_Length (UpnpString *p, size_t n) |
Truncates the string to the specified lenght, or does nothing if the current lenght is less than or equal to the requested length. | |
const char * | UpnpString_get_String (const UpnpString *p) |
Returns the pointer to char. | |
int | UpnpString_set_String (UpnpString *p, const char *s) |
Sets the string from a pointer to char. | |
int | UpnpString_set_StringN (UpnpString *p, const char *s, size_t n) |
Sets the string from a pointer to char using a maximum of N chars. | |
void | UpnpString_clear (UpnpString *p) |
Clears the string, sets its size to zero. | |
int | UpnpString_cmp (UpnpString *p, UpnpString *q) |
Compares two strings for equality. Case matters. | |
int | UpnpString_casecmp (UpnpString *p, UpnpString *q) |
Compares two strings for equality. Case does not matter. | |
static size_t | strnlen (const char *s, size_t n) |
static char * | strndup (const char *__string, size_t __n) |
Implements string operations in the UPnP library.
Due to its heavy use, this class is coded for efficiency, not for beauty. Do not use this as example to other classes. Please take a look at any other one.
typedef struct s_UpnpString UpnpString |
Type of the string objects inside libupnp.
void UpnpString_assign | ( | UpnpString * | p, |
const UpnpString * | q | ||
) |
Assignment operator.
[in] | p | The this pointer. |
[in] | q | The that pointer. |
References UpnpString_get_String(), and UpnpString_set_String().
Referenced by genaSubscribe(), ScheduleGenaAutoRenew(), and UpnpThreadDistribution().
int UpnpString_casecmp | ( | UpnpString * | p, |
UpnpString * | q | ||
) |
Compares two strings for equality. Case does not matter.
[in] | p | The the first string. |
[in] | q | The the second string. |
References UpnpString_get_String().
void UpnpString_clear | ( | UpnpString * | p | ) |
Clears the string, sets its size to zero.
[in] | p | The this pointer. |
Referenced by gena_subscribe(), and genaSubscribe().
int UpnpString_cmp | ( | UpnpString * | p, |
UpnpString * | q | ||
) |
Compares two strings for equality. Case matters.
[in] | p | The the first string. |
[in] | q | The the second string. |
References UpnpString_get_String().
void UpnpString_delete | ( | UpnpString * | p | ) |
Destructor.
[in] | p | The this pointer. |
References SUpnpString::m_length, and SUpnpString::m_string.
Referenced by GenaAutoRenewSubscription(), genaRenewSubscription(), genaSubscribe(), Param_delete(), UpnpClientSubscription_delete(), UpnpClientSubscription_set_ActualSID(), UpnpClientSubscription_set_EventURL(), UpnpClientSubscription_set_SID(), UpnpClientSubscription_strcpy_ActualSID(), UpnpClientSubscription_strcpy_EventURL(), UpnpClientSubscription_strcpy_SID(), UpnpRenewSubscription(), UpnpSubscribe(), UpnpThreadDistribution(), and UpnpUnSubscribe().
UpnpString * UpnpString_dup | ( | const UpnpString * | p | ) |
Copy Constructor.
[in] | p | The this pointer. |
References SUpnpString::m_length, and SUpnpString::m_string.
Referenced by UpnpClientSubscription_set_ActualSID(), UpnpClientSubscription_set_EventURL(), UpnpClientSubscription_set_SID(), and UpnpThreadDistribution().
size_t UpnpString_get_Length | ( | const UpnpString * | p | ) |
Returns the length of the string.
[in] | p | The this pointer. |
Referenced by gena_subscribe(), and gena_unsubscribe().
const char * UpnpString_get_String | ( | const UpnpString * | p | ) |
Returns the pointer to char.
[in] | p | The this pointer. |
Referenced by gena_process_notification_event(), gena_subscribe(), gena_unsubscribe(), GetClientSubClientSID(), RemoveClientSubClientSID(), ScheduleGenaAutoRenew(), UpnpString_assign(), UpnpString_casecmp(), UpnpString_cmp(), UpnpSubscribe(), and UpnpThreadDistribution().
UpnpString * UpnpString_new | ( | ) |
Constructor.
References SUpnpString::m_length, and SUpnpString::m_string.
Referenced by GenaAutoRenewSubscription(), genaRenewSubscription(), genaSubscribe(), ScheduleGenaAutoRenew(), UpnpClientSubscription_new(), UpnpClientSubscription_strcpy_ActualSID(), UpnpClientSubscription_strcpy_EventURL(), UpnpClientSubscription_strcpy_SID(), UpnpGetServiceVarStatusAsync(), UpnpRenewSubscription(), UpnpSendActionAsync(), UpnpSendActionExAsync(), UpnpSubscribe(), UpnpSubscribeAsync(), UpnpThreadDistribution(), and UpnpUnSubscribe().
void UpnpString_set_Length | ( | UpnpString * | p, |
size_t | n | ||
) |
Truncates the string to the specified lenght, or does nothing if the current lenght is less than or equal to the requested length.
[in] | p | The this pointer. |
[in] | n | The requested length. |
References SUpnpString::m_length.
int UpnpString_set_String | ( | UpnpString * | p, |
const char * | s | ||
) |
Sets the string from a pointer to char.
[in] | p | The this pointer. |
[in] | s | (char *) to copy from. |
References SUpnpString::m_string.
Referenced by GenaAutoRenewSubscription(), genaSubscribe(), UpnpClientSubscription_strcpy_ActualSID(), UpnpClientSubscription_strcpy_EventURL(), UpnpClientSubscription_strcpy_SID(), UpnpGetServiceVarStatusAsync(), UpnpRenewSubscription(), UpnpSendActionAsync(), UpnpSendActionExAsync(), UpnpString_assign(), UpnpSubscribe(), UpnpSubscribeAsync(), UpnpThreadDistribution(), and UpnpUnSubscribe().
int UpnpString_set_StringN | ( | UpnpString * | p, |
const char * | s, | ||
size_t | n | ||
) |
Sets the string from a pointer to char using a maximum of N chars.
[in] | p | The this pointer. |
[in] | s | (char *) to copy from. |
n | Maximum number of chars to copy. |
References SUpnpString::m_string.
Referenced by gena_subscribe().