2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef STRING_H
|
|
|
|
#define STRING_H
|
|
|
|
|
|
|
|
|
2008-05-06 04:24:12 +02:00
|
|
|
/*!
|
|
|
|
* \file
|
|
|
|
*
|
|
|
|
* \defgroup UpnpString The UpnpString Class
|
|
|
|
*
|
|
|
|
* \author Marcelo Roberto Jimenez
|
|
|
|
*
|
|
|
|
* \version 1.0
|
|
|
|
*
|
2008-05-06 21:29:24 +02:00
|
|
|
* \brief String implementation for the UPnP library.
|
2008-05-06 04:24:12 +02:00
|
|
|
*
|
2008-05-06 21:29:24 +02:00
|
|
|
* This class implements string operations in the UPnP library.
|
2008-05-06 04:24:12 +02:00
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
2008-05-04 21:56:15 +02:00
|
|
|
|
|
|
|
|
2008-04-26 03:20:09 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
2008-05-06 04:24:12 +02:00
|
|
|
/*!
|
|
|
|
* \brief Type of the string objects inside libupnp.
|
|
|
|
*/
|
2008-05-22 19:24:56 +02:00
|
|
|
typedef struct s_UpnpString UpnpString;
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
|
2008-05-06 04:24:12 +02:00
|
|
|
/*!
|
|
|
|
* \brief Constructor.
|
|
|
|
*
|
|
|
|
* \return A pointer to a new allocated object.
|
|
|
|
*/
|
2008-04-26 03:20:09 +02:00
|
|
|
UpnpString *UpnpString_new();
|
|
|
|
|
|
|
|
|
2008-05-06 04:24:12 +02:00
|
|
|
/*!
|
|
|
|
* \brief Destructor.
|
|
|
|
*/
|
|
|
|
void UpnpString_delete(
|
|
|
|
/*! \em \b this pointer. */
|
|
|
|
UpnpString *p);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Copy Constructor.
|
|
|
|
*
|
|
|
|
* \return A pointer to a new allocated copy of the original object.
|
|
|
|
*/
|
|
|
|
UpnpString *UpnpString_dup(
|
|
|
|
/*! \em \b this pointer. */
|
|
|
|
const UpnpString *p);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Assignment operator.
|
|
|
|
*/
|
|
|
|
void UpnpString_assign(
|
|
|
|
/*! \em \b this pointer. */
|
|
|
|
UpnpString *p,
|
|
|
|
/*! Pointer to the right hand side object. */
|
|
|
|
const UpnpString *q);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns the length of the string.
|
|
|
|
*
|
|
|
|
* \return The length of the string.
|
|
|
|
* */
|
|
|
|
int UpnpString_get_Length(
|
|
|
|
/*! \em \b this pointer. */
|
|
|
|
const UpnpString *p);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns the pointer to char.
|
|
|
|
*
|
|
|
|
* \return The pointer to char.
|
|
|
|
*/
|
|
|
|
const char *UpnpString_get_String(
|
|
|
|
/*! \em \b this pointer. */
|
|
|
|
const UpnpString *p);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Sets the string from a pointer to char.
|
|
|
|
*/
|
|
|
|
void UpnpString_set_String(
|
|
|
|
/*! \em \b this pointer. */
|
|
|
|
UpnpString *p,
|
|
|
|
/*! (char *) to copy from. */
|
|
|
|
const char *s);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Sets the string from a pointer to char using a maximum of N chars.
|
|
|
|
*/
|
|
|
|
void UpnpString_set_StringN(
|
|
|
|
/*! \em \b this pointer. */
|
|
|
|
UpnpString *p,
|
|
|
|
/*! (char *) to copy from. */
|
|
|
|
const char *s,
|
|
|
|
/*! Maximum number of chars to copy.*/
|
|
|
|
int n);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Clears the string, sets its size to zero.
|
|
|
|
*/
|
|
|
|
void UpnpString_clear(
|
|
|
|
/*! \em \b this pointer. */
|
|
|
|
UpnpString *p);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
2008-05-06 04:24:12 +02:00
|
|
|
/* @} UpnpString The UpnpString API */
|
|
|
|
|
|
|
|
|
2008-04-26 03:20:09 +02:00
|
|
|
#endif /* STRING_H */
|
|
|
|
|