UpnpString.h
Go to the documentation of this file.
#ifndef STRING_H
#define STRING_H
#include "UpnpGlobal.h" /* for UPNP_EXPORT_SPEC */
#include <stdlib.h> /* for size_t */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct s_UpnpString UpnpString;
UPNP_EXPORT_SPEC UpnpString *UpnpString_new(void);
UPNP_EXPORT_SPEC void UpnpString_delete(
UpnpString *p);
UPNP_EXPORT_SPEC UpnpString *UpnpString_dup(
const UpnpString *p);
UPNP_EXPORT_SPEC void UpnpString_assign(
UpnpString *p,
const UpnpString *q);
UPNP_EXPORT_SPEC size_t UpnpString_get_Length(
const UpnpString *p);
UPNP_EXPORT_SPEC void UpnpString_set_Length(
UpnpString *p,
size_t n);
UPNP_EXPORT_SPEC const char *UpnpString_get_String(
const UpnpString *p);
UPNP_EXPORT_SPEC int UpnpString_set_String(
UpnpString *p,
const char *s);
UPNP_EXPORT_SPEC int UpnpString_set_StringN(
UpnpString *p,
const char *s,
size_t n);
UPNP_EXPORT_SPEC void UpnpString_clear(
UpnpString *p);
UPNP_EXPORT_SPEC int UpnpString_cmp(
UpnpString *p,
UpnpString *q);
UPNP_EXPORT_SPEC int UpnpString_casecmp(
UpnpString *p,
UpnpString *q);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* @} UpnpString The UpnpString API */
#endif /* STRING_H */
UpnpGlobal.h
Defines constants that for some reason are not defined on some systems.
UPNP_EXPORT_SPEC
#define UPNP_EXPORT_SPEC
Export functions on WIN32 DLLs.
Definition UpnpGlobal.h:105
UpnpString_dup
UpnpString * UpnpString_dup(const UpnpString *p)
Copy Constructor.
Definition UpnpString.c:115
UpnpString_set_StringN
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.
Definition UpnpString.c:175
UpnpString_set_String
int UpnpString_set_String(UpnpString *p, const char *s)
Sets the string from a pointer to char.
Definition UpnpString.c:162
UpnpString_casecmp
int UpnpString_casecmp(UpnpString *p, UpnpString *q)
Compares two strings for equality. Case does not matter.
Definition UpnpString.c:203
UpnpString_get_Length
size_t UpnpString_get_Length(const UpnpString *p)
Returns the length of the string.
Definition UpnpString.c:143
UpnpString_new
UpnpString * UpnpString_new(void)
Constructor.
Definition UpnpString.c:74
UpnpString_get_String
const char * UpnpString_get_String(const UpnpString *p)
Returns the pointer to char.
Definition UpnpString.c:157
UpnpString_delete
void UpnpString_delete(UpnpString *p)
Destructor.
Definition UpnpString.c:100
UpnpString_cmp
int UpnpString_cmp(UpnpString *p, UpnpString *q)
Compares two strings for equality. Case matters.
Definition UpnpString.c:195
UpnpString_set_Length
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 e...
Definition UpnpString.c:148
UpnpString
struct s_UpnpString UpnpString
Type of the string objects inside libupnp.
Definition UpnpString.h:33
UpnpString_assign
void UpnpString_assign(UpnpString *p, const UpnpString *q)
Assignment operator.
Definition UpnpString.c:136
UpnpString_clear
void UpnpString_clear(UpnpString *p)
Clears the string, sets its size to zero.
Definition UpnpString.c:188