Added EXPORT_SPEC to the new API functions, so that these functions get

exported on win32 DLLs. Also did some doxygenation.


git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@418 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez
2008-06-05 22:41:50 +00:00
parent 7a796b264e
commit 9fc2c364fa
23 changed files with 634 additions and 267 deletions

View File

@@ -30,7 +30,8 @@ upnpinclude_HEADERS = \
inc/SubscriptionRequest.h \ inc/SubscriptionRequest.h \
inc/UpnpString.h \ inc/UpnpString.h \
inc/upnp.h \ inc/upnp.h \
inc/upnpdebug.h inc/upnpdebug.h \
inc/UpnpGlobal.h
nodist_upnpinclude_HEADERS = inc/upnpconfig.h nodist_upnpinclude_HEADERS = inc/upnpconfig.h
if ENABLE_TOOLS if ENABLE_TOOLS

View File

@@ -4,48 +4,158 @@
#define ACTIONCOMPLETE_H #define ACTIONCOMPLETE_H
/*!
* \file
*
* \brief UpnpActionComplete object declararion.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
/*!
* \brief The type of an UpnpActionComplete object.
*/
typedef struct s_UpnpActionComplete UpnpActionComplete; typedef struct s_UpnpActionComplete UpnpActionComplete;
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include "UpnpString.h" #include "UpnpString.h"
#include "ixml.h" /* for IXML_Document */ #include "ixml.h" /* for IXML_Document */
/** Constructor */ /*!
UpnpActionComplete *UpnpActionComplete_new(); * \brief Constructor.
*
* \return Pointer to the newly created object.
*/
EXPORT_SPEC UpnpActionComplete *UpnpActionComplete_new();
/** Destructor */
void UpnpActionComplete_delete(UpnpActionComplete *p);
/** Copy Constructor */ /*!
UpnpActionComplete *UpnpActionComplete_dup(const UpnpActionComplete *p); * \brief Destructor.
*/
EXPORT_SPEC void UpnpActionComplete_delete(
/*! [in] \b this pointer. */
UpnpActionComplete *p);
/** Assignment operator */
void UpnpActionComplete_assign(UpnpActionComplete *q, const UpnpActionComplete *p);
/** The result of the operation */ /*!
int UpnpActionComplete_get_ErrCode(const UpnpActionComplete *p); * \brief Copy Constructor.
void UpnpActionComplete_set_ErrCode(UpnpActionComplete *p, int n); */
EXPORT_SPEC UpnpActionComplete *UpnpActionComplete_dup(
/*! [in] \b this pointer. */
const UpnpActionComplete *p);
/** The control URL for service. */
const UpnpString *UpnpActionComplete_get_CtrlUrl(const UpnpActionComplete *p);
void UpnpActionComplete_set_CtrlUrl(UpnpActionComplete *p, const UpnpString *s);
void UpnpActionComplete_strcpy_CtrlUrl(UpnpActionComplete *p, const char *s);
/** The DOM document describing the action */ /*!
IXML_Document *UpnpActionComplete_get_ActionRequest(const UpnpActionComplete *p); * \brief Assignment operator.
void UpnpActionComplete_set_ActionRequest(UpnpActionComplete *p, IXML_Document *d); */
EXPORT_SPEC void UpnpActionComplete_assign(
/*! [in] \b this pointer. */
UpnpActionComplete *q,
/*! [in] \b that pointer. */
const UpnpActionComplete *p);
/** The DOM document describing the result of the action */
IXML_Document *UpnpActionComplete_get_ActionResult(const UpnpActionComplete *p); /*!
void UpnpActionComplete_set_ActionResult(UpnpActionComplete *p, IXML_Document *d); * \brief Error code getter.
*/
EXPORT_SPEC int UpnpActionComplete_get_ErrCode(
/*! [in] \b this pointer. */
const UpnpActionComplete *p);
/*!
* \brief Error code setter.
*/
EXPORT_SPEC void UpnpActionComplete_set_ErrCode(
/*! [in] \b this pointer. */
UpnpActionComplete *p,
/*! [in] The error code to set. */
int n);
/*!
* \brief Control URL getter.
*
* \retrun The control URL string.
*/
EXPORT_SPEC const UpnpString *UpnpActionComplete_get_CtrlUrl(
/*! [in] \b this pointer. */
const UpnpActionComplete *p);
/*!
* \brief Control URL setter.
*/
EXPORT_SPEC void UpnpActionComplete_set_CtrlUrl(
/*! [in] \b this pointer. */
UpnpActionComplete *p,
/*! [in] The control URL string to copy. */
const UpnpString *s);
/*!
* \brief Set the control URL from a null terminated C string.
*/
EXPORT_SPEC void UpnpActionComplete_strcpy_CtrlUrl(
/*! [in] \b this pointer. */
UpnpActionComplete *p,
/*! [in] The null terminated control URL C string to copy. */
const char *s);
/*!
* \brief ActionRequest document getter.
*
* \return A pointer to the document object.
*/
EXPORT_SPEC IXML_Document *UpnpActionComplete_get_ActionRequest(
/*! [in] \b this pointer. */
const UpnpActionComplete *p);
/*!
* \brief ActionRequest document setter.
*
* \note The ActionComplete object takes ownership of the document parameter,
* i.e. it is responsible for deleting it upon destruction.
*/
EXPORT_SPEC void UpnpActionComplete_set_ActionRequest(
/*! [in] \b this pointer. */
UpnpActionComplete *p,
/*! [in] Document to copy. */
IXML_Document *d);
/*!
* \brief ActionResult document getter.
*/
EXPORT_SPEC IXML_Document *UpnpActionComplete_get_ActionResult(
/*! [in] \b this pointer. */
const UpnpActionComplete *p);
/*!
* \brief ActionResult document setter.
*
* \note The ActionComplete object takes ownership of the document parameter,
* i.e. it is responsible for deleting it upon destruction.
*/
EXPORT_SPEC void UpnpActionComplete_set_ActionResult(
/*! [in] \b this pointer. */
UpnpActionComplete *p,
/*! [in] Document to copy. */
IXML_Document *d);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,16 +4,27 @@
#define ACTIONREQUEST_H #define ACTIONREQUEST_H
/*!
* \file
*
* \brief UpnpActionRequest object declaration.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
/** Returned as part of a \b UPNP_CONTROL_ACTION_COMPLETE callback. */ /*! Returned as part of a \b UPNP_CONTROL_ACTION_COMPLETE callback. */
typedef struct s_UpnpActionRequest UpnpActionRequest; typedef struct s_UpnpActionRequest UpnpActionRequest;
#include "ixml.h" /* for IXML_Document */ #include "ixml.h" /* for IXML_Document */
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include "UpnpString.h" #include "UpnpString.h"
@@ -24,59 +35,59 @@ typedef struct s_UpnpActionRequest UpnpActionRequest;
#endif #endif
/** Constructor */ /*! Constructor */
UpnpActionRequest *UpnpActionRequest_new(); EXPORT_SPEC UpnpActionRequest *UpnpActionRequest_new();
/** Destructor */ /*! Destructor */
void UpnpActionRequest_delete(UpnpActionRequest *p); EXPORT_SPEC void UpnpActionRequest_delete(UpnpActionRequest *p);
/** Copy Constructor */ /*! Copy Constructor */
UpnpActionRequest *UpnpActionRequest_dup(const UpnpActionRequest *p); EXPORT_SPEC UpnpActionRequest *UpnpActionRequest_dup(const UpnpActionRequest *p);
/** Assignment operator */ /*! Assignment operator */
void UpnpActionRequest_assign(UpnpActionRequest *q, const UpnpActionRequest *p); EXPORT_SPEC void UpnpActionRequest_assign(UpnpActionRequest *q, const UpnpActionRequest *p);
/** The result of the operation */ /*! The result of the operation */
int UpnpActionRequest_get_ErrCode(const UpnpActionRequest *p); EXPORT_SPEC int UpnpActionRequest_get_ErrCode(const UpnpActionRequest *p);
void UpnpActionRequest_set_ErrCode(UpnpActionRequest *p, int n); EXPORT_SPEC void UpnpActionRequest_set_ErrCode(UpnpActionRequest *p, int n);
/** The socket number of the connection to the requestor */ /*! The socket number of the connection to the requestor */
int UpnpActionRequest_get_Socket(const UpnpActionRequest *p); EXPORT_SPEC int UpnpActionRequest_get_Socket(const UpnpActionRequest *p);
void UpnpActionRequest_set_Socket(UpnpActionRequest *p, int n); EXPORT_SPEC void UpnpActionRequest_set_Socket(UpnpActionRequest *p, int n);
/** The error string in case of error */ /*! The error string in case of error */
const UpnpString *UpnpActionRequest_get_ErrStr(const UpnpActionRequest *p); EXPORT_SPEC const UpnpString *UpnpActionRequest_get_ErrStr(const UpnpActionRequest *p);
void UpnpActionRequest_set_ErrStr(UpnpActionRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpActionRequest_set_ErrStr(UpnpActionRequest *p, const UpnpString *s);
void UpnpActionRequest_strcpy_ErrStr(UpnpActionRequest *p, const char *s); EXPORT_SPEC void UpnpActionRequest_strcpy_ErrStr(UpnpActionRequest *p, const char *s);
/** The Action Name */ /*! The Action Name */
const UpnpString *UpnpActionRequest_get_ActionName(const UpnpActionRequest *p); EXPORT_SPEC const UpnpString *UpnpActionRequest_get_ActionName(const UpnpActionRequest *p);
void UpnpActionRequest_set_ActionName(UpnpActionRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpActionRequest_set_ActionName(UpnpActionRequest *p, const UpnpString *s);
void UpnpActionRequest_strcpy_ActionName(UpnpActionRequest *p, const char *s); EXPORT_SPEC void UpnpActionRequest_strcpy_ActionName(UpnpActionRequest *p, const char *s);
/** The unique device ID */ /*! The unique device ID */
const UpnpString *UpnpActionRequest_get_DevUDN(const UpnpActionRequest *p); EXPORT_SPEC const UpnpString *UpnpActionRequest_get_DevUDN(const UpnpActionRequest *p);
void UpnpActionRequest_set_DevUDN(UpnpActionRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpActionRequest_set_DevUDN(UpnpActionRequest *p, const UpnpString *s);
/** The service ID */ /*! The service ID */
const UpnpString *UpnpActionRequest_get_ServiceID(const UpnpActionRequest *p); EXPORT_SPEC const UpnpString *UpnpActionRequest_get_ServiceID(const UpnpActionRequest *p);
void UpnpActionRequest_set_ServiceID(UpnpActionRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpActionRequest_set_ServiceID(UpnpActionRequest *p, const UpnpString *s);
/** The DOM document describing the action */ /*! The DOM document describing the action */
IXML_Document *UpnpActionRequest_get_ActionRequest(const UpnpActionRequest *p); EXPORT_SPEC IXML_Document *UpnpActionRequest_get_ActionRequest(const UpnpActionRequest *p);
void UpnpActionRequest_set_ActionRequest(UpnpActionRequest *p, IXML_Document *d); EXPORT_SPEC void UpnpActionRequest_set_ActionRequest(UpnpActionRequest *p, IXML_Document *d);
/** The DOM document describing the result of the action */ /*! The DOM document describing the result of the action */
IXML_Document *UpnpActionRequest_get_ActionResult(const UpnpActionRequest *p); EXPORT_SPEC IXML_Document *UpnpActionRequest_get_ActionResult(const UpnpActionRequest *p);
void UpnpActionRequest_set_ActionResult(UpnpActionRequest *p, IXML_Document *d); EXPORT_SPEC void UpnpActionRequest_set_ActionResult(UpnpActionRequest *p, IXML_Document *d);
/** The DOM document containing the information from the SOAP header */ /*! The DOM document containing the information from the SOAP header */
IXML_Document *UpnpActionRequest_get_SoapHeader(const UpnpActionRequest *p); EXPORT_SPEC IXML_Document *UpnpActionRequest_get_SoapHeader(const UpnpActionRequest *p);
void UpnpActionRequest_set_SoapHeader(UpnpActionRequest *p, IXML_Document *d); EXPORT_SPEC void UpnpActionRequest_set_SoapHeader(UpnpActionRequest *p, IXML_Document *d);
/** IP address of the control point requesting this action */ /*! IP address of the control point requesting this action */
struct sockaddr *UpnpActionRequest_get_CtrlPtIPAddr(const UpnpActionRequest *p); EXPORT_SPEC struct sockaddr *UpnpActionRequest_get_CtrlPtIPAddr(const UpnpActionRequest *p);
void UpnpActionRequest_set_CtrlPtIPAddr(UpnpActionRequest *p, struct sockaddr *sa); EXPORT_SPEC void UpnpActionRequest_set_CtrlPtIPAddr(UpnpActionRequest *p, struct sockaddr *sa);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,6 +4,16 @@
#define DISCOVERY_H #define DISCOVERY_H
/*!
* \file
*
* \brief UpnpDiscovery object declararion.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -13,6 +23,7 @@ extern "C" {
typedef struct s_UpnpDiscovery UpnpDiscovery; typedef struct s_UpnpDiscovery UpnpDiscovery;
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include "UpnpString.h" #include "UpnpString.h"
@@ -24,71 +35,71 @@ typedef struct s_UpnpDiscovery UpnpDiscovery;
/** Constructor */ /** Constructor */
UpnpDiscovery *UpnpDiscovery_new(); EXPORT_SPEC UpnpDiscovery *UpnpDiscovery_new();
/** Destructor */ /** Destructor */
void UpnpDiscovery_delete(UpnpDiscovery *p); EXPORT_SPEC void UpnpDiscovery_delete(UpnpDiscovery *p);
/** Copy Constructor */ /** Copy Constructor */
UpnpDiscovery *UpnpDiscovery_dup(const UpnpDiscovery *p); EXPORT_SPEC UpnpDiscovery *UpnpDiscovery_dup(const UpnpDiscovery *p);
/** Assignment operator */ /** Assignment operator */
void UpnpDiscovery_assign(UpnpDiscovery *q, const UpnpDiscovery *p); EXPORT_SPEC void UpnpDiscovery_assign(UpnpDiscovery *q, const UpnpDiscovery *p);
/** The result code of the \b UpnpSearchAsync call. */ /** The result code of the \b UpnpSearchAsync call. */
int UpnpDiscovery_get_ErrCode(const UpnpDiscovery *p); EXPORT_SPEC int UpnpDiscovery_get_ErrCode(const UpnpDiscovery *p);
void UpnpDiscovery_set_ErrCode(UpnpDiscovery *p, int n); EXPORT_SPEC void UpnpDiscovery_set_ErrCode(UpnpDiscovery *p, int n);
/** The expiration time of the advertisement. */ /** The expiration time of the advertisement. */
int UpnpDiscovery_get_Expires(const UpnpDiscovery *p); EXPORT_SPEC int UpnpDiscovery_get_Expires(const UpnpDiscovery *p);
void UpnpDiscovery_set_Expires(UpnpDiscovery *p, int n); EXPORT_SPEC void UpnpDiscovery_set_Expires(UpnpDiscovery *p, int n);
/** The unique device identifier. */ /** The unique device identifier. */
const UpnpString *UpnpDiscovery_get_DeviceID(const UpnpDiscovery *p); EXPORT_SPEC const UpnpString *UpnpDiscovery_get_DeviceID(const UpnpDiscovery *p);
void UpnpDiscovery_set_DeviceID(UpnpDiscovery *p, const UpnpString *s); EXPORT_SPEC void UpnpDiscovery_set_DeviceID(UpnpDiscovery *p, const UpnpString *s);
void UpnpDiscovery_strcpy_DeviceID(UpnpDiscovery *p, const char *s); EXPORT_SPEC void UpnpDiscovery_strcpy_DeviceID(UpnpDiscovery *p, const char *s);
/** The device type. */ /** The device type. */
const UpnpString *UpnpDiscovery_get_DeviceType(const UpnpDiscovery *p); EXPORT_SPEC const UpnpString *UpnpDiscovery_get_DeviceType(const UpnpDiscovery *p);
void UpnpDiscovery_set_DeviceType(UpnpDiscovery *p, const UpnpString *s); EXPORT_SPEC void UpnpDiscovery_set_DeviceType(UpnpDiscovery *p, const UpnpString *s);
void UpnpDiscovery_strcpy_DeviceType(UpnpDiscovery *p, const char *s); EXPORT_SPEC void UpnpDiscovery_strcpy_DeviceType(UpnpDiscovery *p, const char *s);
/** The ServiceType. */ /** The ServiceType. */
const UpnpString *UpnpDiscovery_get_ServiceType(const UpnpDiscovery *p); EXPORT_SPEC const UpnpString *UpnpDiscovery_get_ServiceType(const UpnpDiscovery *p);
void UpnpDiscovery_set_ServiceType(UpnpDiscovery *p, const UpnpString *s); EXPORT_SPEC void UpnpDiscovery_set_ServiceType(UpnpDiscovery *p, const UpnpString *s);
void UpnpDiscovery_strcpy_ServiceType(UpnpDiscovery *p, const char *s); EXPORT_SPEC void UpnpDiscovery_strcpy_ServiceType(UpnpDiscovery *p, const char *s);
/** The service version. */ /** The service version. */
const UpnpString *UpnpDiscovery_get_ServiceVer(const UpnpDiscovery *p); EXPORT_SPEC const UpnpString *UpnpDiscovery_get_ServiceVer(const UpnpDiscovery *p);
void UpnpDiscovery_set_ServiceVer(UpnpDiscovery *p, const UpnpString *s); EXPORT_SPEC void UpnpDiscovery_set_ServiceVer(UpnpDiscovery *p, const UpnpString *s);
void UpnpDiscovery_strcpy_ServiceVer(UpnpDiscovery *p, const char *s); EXPORT_SPEC void UpnpDiscovery_strcpy_ServiceVer(UpnpDiscovery *p, const char *s);
/** The URL to the UPnP description document for the device. */ /** The URL to the UPnP description document for the device. */
const UpnpString *UpnpDiscovery_get_Location(const UpnpDiscovery *p); EXPORT_SPEC const UpnpString *UpnpDiscovery_get_Location(const UpnpDiscovery *p);
void UpnpDiscovery_set_Location(UpnpDiscovery *p, const UpnpString *s); EXPORT_SPEC void UpnpDiscovery_set_Location(UpnpDiscovery *p, const UpnpString *s);
void UpnpDiscovery_strcpy_Location(UpnpDiscovery *p, const char *s); EXPORT_SPEC void UpnpDiscovery_strcpy_Location(UpnpDiscovery *p, const char *s);
void UpnpDiscovery_strncpy_Location(UpnpDiscovery *p, const char *s, int n); EXPORT_SPEC void UpnpDiscovery_strncpy_Location(UpnpDiscovery *p, const char *s, int n);
/** The operating system the device is running. */ /** The operating system the device is running. */
const UpnpString *UpnpDiscovery_get_Os(const UpnpDiscovery *p); EXPORT_SPEC const UpnpString *UpnpDiscovery_get_Os(const UpnpDiscovery *p);
void UpnpDiscovery_set_Os(UpnpDiscovery *p, const UpnpString *s); EXPORT_SPEC void UpnpDiscovery_set_Os(UpnpDiscovery *p, const UpnpString *s);
void UpnpDiscovery_strcpy_Os(UpnpDiscovery *p, const char *s); EXPORT_SPEC void UpnpDiscovery_strcpy_Os(UpnpDiscovery *p, const char *s);
void UpnpDiscovery_strncpy_Os(UpnpDiscovery *p, const char *s, int n); EXPORT_SPEC void UpnpDiscovery_strncpy_Os(UpnpDiscovery *p, const char *s, int n);
/** Date when the response was generated. */ /** Date when the response was generated. */
const UpnpString *UpnpDiscovery_get_Date(const UpnpDiscovery *p); EXPORT_SPEC const UpnpString *UpnpDiscovery_get_Date(const UpnpDiscovery *p);
void UpnpDiscovery_set_Date(UpnpDiscovery *p, const UpnpString *s); EXPORT_SPEC void UpnpDiscovery_set_Date(UpnpDiscovery *p, const UpnpString *s);
void UpnpDiscovery_strcpy_Date(UpnpDiscovery *p, const char *s); EXPORT_SPEC void UpnpDiscovery_strcpy_Date(UpnpDiscovery *p, const char *s);
/** Confirmation that the MAN header was understood by the device. */ /** Confirmation that the MAN header was understood by the device. */
const UpnpString *UpnpDiscovery_get_Ext(const UpnpDiscovery *p); EXPORT_SPEC const UpnpString *UpnpDiscovery_get_Ext(const UpnpDiscovery *p);
void UpnpDiscovery_set_Ext(UpnpDiscovery *p, const UpnpString *s); EXPORT_SPEC void UpnpDiscovery_set_Ext(UpnpDiscovery *p, const UpnpString *s);
void UpnpDiscovery_strcpy_Ext(UpnpDiscovery *p, const char *s); EXPORT_SPEC void UpnpDiscovery_strcpy_Ext(UpnpDiscovery *p, const char *s);
void UpnpDiscovery_strncpy_Ext(UpnpDiscovery *p, const char *s, int n); EXPORT_SPEC void UpnpDiscovery_strncpy_Ext(UpnpDiscovery *p, const char *s, int n);
/** The host address of the device responding to the search. */ /** The host address of the device responding to the search. */
struct sockaddr *UpnpDiscovery_get_DestAddr(const UpnpDiscovery *p); EXPORT_SPEC struct sockaddr *UpnpDiscovery_get_DestAddr(const UpnpDiscovery *p);
void UpnpDiscovery_set_DestAddr(UpnpDiscovery *p, struct sockaddr *sa); EXPORT_SPEC void UpnpDiscovery_set_DestAddr(UpnpDiscovery *p, struct sockaddr *sa);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,6 +4,16 @@
#define EVENT_H #define EVENT_H
/*!
* \file
*
* \brief UpnpEvent object declararion.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -14,32 +24,33 @@ typedef struct s_UpnpEvent UpnpEvent;
#include "ixml.h" /* for IXML_Document */ #include "ixml.h" /* for IXML_Document */
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include "UpnpString.h" #include "UpnpString.h"
/** Constructor */ /** Constructor */
UpnpEvent *UpnpEvent_new(); EXPORT_SPEC UpnpEvent *UpnpEvent_new();
/** Destructor */ /** Destructor */
void UpnpEvent_delete(UpnpEvent *p); EXPORT_SPEC void UpnpEvent_delete(UpnpEvent *p);
/** Copy Constructor */ /** Copy Constructor */
UpnpEvent *UpnpEvent_dup(const UpnpEvent *p); EXPORT_SPEC UpnpEvent *UpnpEvent_dup(const UpnpEvent *p);
/** Assignment operator */ /** Assignment operator */
void UpnpEvent_assign(UpnpEvent *q, const UpnpEvent *p); EXPORT_SPEC void UpnpEvent_assign(UpnpEvent *q, const UpnpEvent *p);
/** The event sequence number. */ /** The event sequence number. */
int UpnpEvent_get_EventKey(const UpnpEvent *p); EXPORT_SPEC int UpnpEvent_get_EventKey(const UpnpEvent *p);
void UpnpEvent_set_EventKey(UpnpEvent *p, int n); EXPORT_SPEC void UpnpEvent_set_EventKey(UpnpEvent *p, int n);
/** The DOM tree representing the changes generating the event. */ /** The DOM tree representing the changes generating the event. */
IXML_Document *UpnpEvent_get_ChangedVariables(const UpnpEvent *p); EXPORT_SPEC IXML_Document *UpnpEvent_get_ChangedVariables(const UpnpEvent *p);
void UpnpEvent_set_ChangedVariables(UpnpEvent *p, IXML_Document *d); EXPORT_SPEC void UpnpEvent_set_ChangedVariables(UpnpEvent *p, IXML_Document *d);
/** The subscription ID for this subscription. */ /** The subscription ID for this subscription. */
UpnpString *UpnpEvent_get_SID(const UpnpEvent *p); EXPORT_SPEC UpnpString *UpnpEvent_get_SID(const UpnpEvent *p);
void UpnpEvent_set_SID(UpnpEvent *p, const UpnpString *s); EXPORT_SPEC void UpnpEvent_set_SID(UpnpEvent *p, const UpnpString *s);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,6 +4,16 @@
#define EVENTSUBSCRIBE_H #define EVENTSUBSCRIBE_H
/*!
* \file
*
* \brief UpnpEventSubscribe object declararion.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -14,44 +24,44 @@ extern "C" {
typedef struct s_UpnpEventSubscribe UpnpEventSubscribe; typedef struct s_UpnpEventSubscribe UpnpEventSubscribe;
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include "UpnpString.h" #include "UpnpString.h"
/** Constructor */ /** Constructor */
UpnpEventSubscribe *UpnpEventSubscribe_new(); EXPORT_SPEC UpnpEventSubscribe *UpnpEventSubscribe_new();
/** Destructor */ /** Destructor */
void UpnpEventSubscribe_delete(UpnpEventSubscribe *p); EXPORT_SPEC void UpnpEventSubscribe_delete(UpnpEventSubscribe *p);
/** Copy Constructor */ /** Copy Constructor */
UpnpEventSubscribe *UpnpEventSubscribe_dup(const UpnpEventSubscribe *p); EXPORT_SPEC UpnpEventSubscribe *UpnpEventSubscribe_dup(const UpnpEventSubscribe *p);
/** Assignment operator */ /** Assignment operator */
void UpnpEventSubscribe_assign(UpnpEventSubscribe *q, const UpnpEventSubscribe *p); EXPORT_SPEC void UpnpEventSubscribe_assign(UpnpEventSubscribe *q, const UpnpEventSubscribe *p);
/** The result of the operation. */ /** The result of the operation. */
int UpnpEventSubscribe_get_ErrCode(const UpnpEventSubscribe *p); EXPORT_SPEC int UpnpEventSubscribe_get_ErrCode(const UpnpEventSubscribe *p);
void UpnpEventSubscribe_set_ErrCode(UpnpEventSubscribe *p, int n); EXPORT_SPEC void UpnpEventSubscribe_set_ErrCode(UpnpEventSubscribe *p, int n);
/** The actual subscription time (for subscriptions only). */ /** The actual subscription time (for subscriptions only). */
int UpnpEventSubscribe_get_TimeOut(const UpnpEventSubscribe *p); EXPORT_SPEC int UpnpEventSubscribe_get_TimeOut(const UpnpEventSubscribe *p);
void UpnpEventSubscribe_set_TimeOut(UpnpEventSubscribe *p, int n); EXPORT_SPEC void UpnpEventSubscribe_set_TimeOut(UpnpEventSubscribe *p, int n);
/** The SID for this subscription. For subscriptions, this only /** The SID for this subscription. For subscriptions, this only
* contains a valid SID if the \b Upnp_EventSubscribe.result field * contains a valid SID if the \b Upnp_EventSubscribe.result field
* contains a {\tt UPNP_E_SUCCESS} result code. For unsubscriptions, * contains a {\tt UPNP_E_SUCCESS} result code. For unsubscriptions,
* this contains the SID from which the subscription is being * this contains the SID from which the subscription is being
* unsubscribed. */ * unsubscribed. */
const UpnpString *UpnpEventSubscribe_get_SID(const UpnpEventSubscribe *p); EXPORT_SPEC const UpnpString *UpnpEventSubscribe_get_SID(const UpnpEventSubscribe *p);
void UpnpEventSubscribe_set_SID(UpnpEventSubscribe *p, const UpnpString *s); EXPORT_SPEC void UpnpEventSubscribe_set_SID(UpnpEventSubscribe *p, const UpnpString *s);
void UpnpEventSubscribe_strcpy_SID(UpnpEventSubscribe *p, const char *s); EXPORT_SPEC void UpnpEventSubscribe_strcpy_SID(UpnpEventSubscribe *p, const char *s);
/** The event URL being subscribed to or removed from. */ /** The event URL being subscribed to or removed from. */
const UpnpString *UpnpEventSubscribe_get_PublisherUrl(const UpnpEventSubscribe *p); EXPORT_SPEC const UpnpString *UpnpEventSubscribe_get_PublisherUrl(const UpnpEventSubscribe *p);
void UpnpEventSubscribe_set_PublisherUrl(UpnpEventSubscribe *p, const UpnpString *s); EXPORT_SPEC void UpnpEventSubscribe_set_PublisherUrl(UpnpEventSubscribe *p, const UpnpString *s);
void UpnpEventSubscribe_strcpy_PublisherUrl(UpnpEventSubscribe *p, const char *s); EXPORT_SPEC void UpnpEventSubscribe_strcpy_PublisherUrl(UpnpEventSubscribe *p, const char *s);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,6 +4,16 @@
#define FILEINFO_H #define FILEINFO_H
/*!
* \file
*
* \brief UpnpFileInfo object declararion.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -14,6 +24,7 @@ typedef struct s_UpnpFileInfo UpnpFileInfo;
#include "ixml.h" /* for DOMString */ #include "ixml.h" /* for DOMString */
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include <sys/types.h> /* for off_t */ #include <sys/types.h> /* for off_t */
@@ -21,46 +32,46 @@ typedef struct s_UpnpFileInfo UpnpFileInfo;
/** Constructor */ /** Constructor */
UpnpFileInfo *UpnpFileInfo_new(); EXPORT_SPEC UpnpFileInfo *UpnpFileInfo_new();
/** Destructor */ /** Destructor */
void UpnpFileInfo_delete(UpnpFileInfo *p); EXPORT_SPEC void UpnpFileInfo_delete(UpnpFileInfo *p);
/** Copy Constructor */ /** Copy Constructor */
UpnpFileInfo *UpnpFileInfo_dup(const UpnpFileInfo *p); EXPORT_SPEC UpnpFileInfo *UpnpFileInfo_dup(const UpnpFileInfo *p);
/** Assignment operator */ /** Assignment operator */
void UpnpFileInfo_assign(UpnpFileInfo *q, const UpnpFileInfo *p); EXPORT_SPEC void UpnpFileInfo_assign(UpnpFileInfo *q, const UpnpFileInfo *p);
/** The length of the file. A length less than 0 indicates the size /** The length of the file. A length less than 0 indicates the size
* is unknown, and data will be sent until 0 bytes are returned from * is unknown, and data will be sent until 0 bytes are returned from
* a read call. */ * a read call. */
off_t UpnpFileInfo_get_FileLength(const UpnpFileInfo *p); EXPORT_SPEC off_t UpnpFileInfo_get_FileLength(const UpnpFileInfo *p);
void UpnpFileInfo_set_FileLength(UpnpFileInfo *p, off_t l); EXPORT_SPEC void UpnpFileInfo_set_FileLength(UpnpFileInfo *p, off_t l);
/** The time at which the contents of the file was modified; /** The time at which the contents of the file was modified;
* The time system is always local (not GMT). */ * The time system is always local (not GMT). */
const time_t *UpnpFileInfo_get_LastModified(const UpnpFileInfo *p); EXPORT_SPEC const time_t *UpnpFileInfo_get_LastModified(const UpnpFileInfo *p);
void UpnpFileInfo_set_LastModified(UpnpFileInfo *p, const time_t *t); EXPORT_SPEC void UpnpFileInfo_set_LastModified(UpnpFileInfo *p, const time_t *t);
/** If the file is a directory, {\bf is_directory} contains /** If the file is a directory, {\bf is_directory} contains
* a non-zero value. For a regular file, it should be 0. */ * a non-zero value. For a regular file, it should be 0. */
int UpnpFileInfo_get_IsDirectory(const UpnpFileInfo *p); EXPORT_SPEC int UpnpFileInfo_get_IsDirectory(const UpnpFileInfo *p);
void UpnpFileInfo_set_IsDirectory(UpnpFileInfo *p, int b); EXPORT_SPEC void UpnpFileInfo_set_IsDirectory(UpnpFileInfo *p, int b);
/** If the file or directory is readable, this contains /** If the file or directory is readable, this contains
* a non-zero value. If unreadable, it should be set to 0. */ * a non-zero value. If unreadable, it should be set to 0. */
int UpnpFileInfo_get_IsReadable(const UpnpFileInfo *p); EXPORT_SPEC int UpnpFileInfo_get_IsReadable(const UpnpFileInfo *p);
void UpnpFileInfo_set_IsReadable(UpnpFileInfo *p, int b); EXPORT_SPEC void UpnpFileInfo_set_IsReadable(UpnpFileInfo *p, int b);
/** The content type of the file. */ /** The content type of the file. */
const DOMString UpnpFileInfo_get_ContentType(const UpnpFileInfo *p); EXPORT_SPEC const DOMString UpnpFileInfo_get_ContentType(const UpnpFileInfo *p);
void UpnpFileInfo_set_ContentType(UpnpFileInfo *p, const DOMString s); EXPORT_SPEC void UpnpFileInfo_set_ContentType(UpnpFileInfo *p, const DOMString s);
/** Additional HTTP headers to return. Each header line should be /** Additional HTTP headers to return. Each header line should be
* followed by "\r\n". */ * followed by "\r\n". */
const DOMString UpnpFileInfo_get_ExtraHeaders(const UpnpFileInfo *p); EXPORT_SPEC const DOMString UpnpFileInfo_get_ExtraHeaders(const UpnpFileInfo *p);
void UpnpFileInfo_set_ExtraHeaders(UpnpFileInfo *p, const DOMString s); EXPORT_SPEC void UpnpFileInfo_set_ExtraHeaders(UpnpFileInfo *p, const DOMString s);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,6 +4,16 @@
#define STATEVARCOMPLETE_H #define STATEVARCOMPLETE_H
/*!
* \file
*
* \brief UpnpStateVarComplete object declararion.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -14,6 +24,7 @@ extern "C" {
typedef struct s_UpnpStateVarComplete UpnpStateVarComplete; typedef struct s_UpnpStateVarComplete UpnpStateVarComplete;
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include "UpnpString.h" #include "UpnpString.h"
@@ -21,35 +32,35 @@ typedef struct s_UpnpStateVarComplete UpnpStateVarComplete;
/** Constructor */ /** Constructor */
UpnpStateVarComplete *UpnpStateVarComplete_new(); EXPORT_SPEC UpnpStateVarComplete *UpnpStateVarComplete_new();
/** Destructor */ /** Destructor */
void UpnpStateVarComplete_delete(UpnpStateVarComplete *p); EXPORT_SPEC void UpnpStateVarComplete_delete(UpnpStateVarComplete *p);
/** Copy Constructor */ /** Copy Constructor */
UpnpStateVarComplete *UpnpStateVarComplete_dup(const UpnpStateVarComplete *p); EXPORT_SPEC UpnpStateVarComplete *UpnpStateVarComplete_dup(const UpnpStateVarComplete *p);
/** Assignment operator */ /** Assignment operator */
void UpnpStateVarComplete_assign(UpnpStateVarComplete *q, const UpnpStateVarComplete *p); EXPORT_SPEC void UpnpStateVarComplete_assign(UpnpStateVarComplete *q, const UpnpStateVarComplete *p);
/** The result of the operation */ /** The result of the operation */
int UpnpStateVarComplete_get_ErrCode(const UpnpStateVarComplete *p); EXPORT_SPEC int UpnpStateVarComplete_get_ErrCode(const UpnpStateVarComplete *p);
void UpnpStateVarComplete_set_ErrCode(UpnpStateVarComplete *p, int n); EXPORT_SPEC void UpnpStateVarComplete_set_ErrCode(UpnpStateVarComplete *p, int n);
/** The control URL for the service. */ /** The control URL for the service. */
const UpnpString *UpnpStateVarComplete_get_CtrlUrl(const UpnpStateVarComplete *p); EXPORT_SPEC const UpnpString *UpnpStateVarComplete_get_CtrlUrl(const UpnpStateVarComplete *p);
void UpnpStateVarComplete_set_CtrlUrl(UpnpStateVarComplete *p, const UpnpString *s); EXPORT_SPEC void UpnpStateVarComplete_set_CtrlUrl(UpnpStateVarComplete *p, const UpnpString *s);
void UpnpStateVarComplete_strcpy_CtrlUrl(UpnpStateVarComplete *p, const char *s); EXPORT_SPEC void UpnpStateVarComplete_strcpy_CtrlUrl(UpnpStateVarComplete *p, const char *s);
/** The name of the variable. */ /** The name of the variable. */
const UpnpString *UpnpStateVarComplete_get_StateVarName(const UpnpStateVarComplete *p); EXPORT_SPEC const UpnpString *UpnpStateVarComplete_get_StateVarName(const UpnpStateVarComplete *p);
void UpnpStateVarComplete_set_StateVarName(UpnpStateVarComplete *p, const UpnpString *s); EXPORT_SPEC void UpnpStateVarComplete_set_StateVarName(UpnpStateVarComplete *p, const UpnpString *s);
void UpnpStateVarComplete_strcpy_StateVarName(UpnpStateVarComplete *p, const char *s); EXPORT_SPEC void UpnpStateVarComplete_strcpy_StateVarName(UpnpStateVarComplete *p, const char *s);
/** The current value of the variable. This needs to be allocated by /** The current value of the variable. This needs to be allocated by
* the caller. When finished with it, the SDK frees this {\bf DOMString}. */ * the caller. When finished with it, the SDK frees this {\bf DOMString}. */
const DOMString UpnpStateVarComplete_get_CurrentVal(const UpnpStateVarComplete *p); EXPORT_SPEC const DOMString UpnpStateVarComplete_get_CurrentVal(const UpnpStateVarComplete *p);
void UpnpStateVarComplete_set_CurrentVal(UpnpStateVarComplete *p, const DOMString s); EXPORT_SPEC void UpnpStateVarComplete_set_CurrentVal(UpnpStateVarComplete *p, const DOMString s);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,6 +4,16 @@
#define STATEVARREQUEST_H #define STATEVARREQUEST_H
/*!
* \file
*
* \brief UpnpStateVarRequest object declararion.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -14,6 +24,7 @@ extern "C" {
typedef struct s_UpnpStateVarRequest UpnpStateVarRequest; typedef struct s_UpnpStateVarRequest UpnpStateVarRequest;
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include "UpnpString.h" #include "UpnpString.h"
@@ -28,51 +39,51 @@ typedef struct s_UpnpStateVarRequest UpnpStateVarRequest;
/** Constructor */ /** Constructor */
UpnpStateVarRequest *UpnpStateVarRequest_new(); EXPORT_SPEC UpnpStateVarRequest *UpnpStateVarRequest_new();
/** Destructor */ /** Destructor */
void UpnpStateVarRequest_delete(UpnpStateVarRequest *p); EXPORT_SPEC void UpnpStateVarRequest_delete(UpnpStateVarRequest *p);
/** Copy Constructor */ /** Copy Constructor */
UpnpStateVarRequest *UpnpStateVarRequest_dup(const UpnpStateVarRequest *p); EXPORT_SPEC UpnpStateVarRequest *UpnpStateVarRequest_dup(const UpnpStateVarRequest *p);
/** Assignment operator */ /** Assignment operator */
void UpnpStateVarRequest_assign(UpnpStateVarRequest *q, const UpnpStateVarRequest *p); EXPORT_SPEC void UpnpStateVarRequest_assign(UpnpStateVarRequest *q, const UpnpStateVarRequest *p);
/** The result of the operation */ /** The result of the operation */
int UpnpStateVarRequest_get_ErrCode(const UpnpStateVarRequest *p); EXPORT_SPEC int UpnpStateVarRequest_get_ErrCode(const UpnpStateVarRequest *p);
void UpnpStateVarRequest_set_ErrCode(UpnpStateVarRequest *p, int n); EXPORT_SPEC void UpnpStateVarRequest_set_ErrCode(UpnpStateVarRequest *p, int n);
/** The socket number of the connection to the requestor */ /** The socket number of the connection to the requestor */
int UpnpStateVarRequest_get_Socket(const UpnpStateVarRequest *p); EXPORT_SPEC int UpnpStateVarRequest_get_Socket(const UpnpStateVarRequest *p);
void UpnpStateVarRequest_set_Socket(UpnpStateVarRequest *p, int n); EXPORT_SPEC void UpnpStateVarRequest_set_Socket(UpnpStateVarRequest *p, int n);
/** The error string in case of error */ /** The error string in case of error */
const UpnpString *UpnpStateVarRequest_get_ErrStr(const UpnpStateVarRequest *p); EXPORT_SPEC const UpnpString *UpnpStateVarRequest_get_ErrStr(const UpnpStateVarRequest *p);
void UpnpStateVarRequest_set_ErrStr(UpnpStateVarRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpStateVarRequest_set_ErrStr(UpnpStateVarRequest *p, const UpnpString *s);
void UpnpStateVarRequest_strcpy_ErrStr(UpnpStateVarRequest *p, const char *s); EXPORT_SPEC void UpnpStateVarRequest_strcpy_ErrStr(UpnpStateVarRequest *p, const char *s);
/** The unique device ID */ /** The unique device ID */
const UpnpString *UpnpStateVarRequest_get_DevUDN(const UpnpStateVarRequest *p); EXPORT_SPEC const UpnpString *UpnpStateVarRequest_get_DevUDN(const UpnpStateVarRequest *p);
void UpnpStateVarRequest_set_DevUDN(UpnpStateVarRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpStateVarRequest_set_DevUDN(UpnpStateVarRequest *p, const UpnpString *s);
/** The service ID */ /** The service ID */
const UpnpString *UpnpStateVarRequest_get_ServiceID(const UpnpStateVarRequest *p); EXPORT_SPEC const UpnpString *UpnpStateVarRequest_get_ServiceID(const UpnpStateVarRequest *p);
void UpnpStateVarRequest_set_ServiceID(UpnpStateVarRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpStateVarRequest_set_ServiceID(UpnpStateVarRequest *p, const UpnpString *s);
/** The name of the variable. */ /** The name of the variable. */
const UpnpString *UpnpStateVarRequest_get_StateVarName(const UpnpStateVarRequest *p); EXPORT_SPEC const UpnpString *UpnpStateVarRequest_get_StateVarName(const UpnpStateVarRequest *p);
void UpnpStateVarRequest_set_StateVarName(UpnpStateVarRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpStateVarRequest_set_StateVarName(UpnpStateVarRequest *p, const UpnpString *s);
void UpnpStateVarRequest_strcpy_StateVarName(UpnpStateVarRequest *p, const char *s); EXPORT_SPEC void UpnpStateVarRequest_strcpy_StateVarName(UpnpStateVarRequest *p, const char *s);
/** IP address of sender requesting the state variable. */ /** IP address of sender requesting the state variable. */
struct sockaddr *UpnpStateVarRequest_get_CtrlPtIPAddr(const UpnpStateVarRequest *p); EXPORT_SPEC struct sockaddr *UpnpStateVarRequest_get_CtrlPtIPAddr(const UpnpStateVarRequest *p);
void UpnpStateVarRequest_set_CtrlPtIPAddr(UpnpStateVarRequest *p, struct sockaddr *sa); EXPORT_SPEC void UpnpStateVarRequest_set_CtrlPtIPAddr(UpnpStateVarRequest *p, struct sockaddr *sa);
/** The current value of the variable. This needs to be allocated by /** The current value of the variable. This needs to be allocated by
* the caller. When finished with it, the SDK frees this {\bf DOMString}. */ * the caller. When finished with it, the SDK frees this {\bf DOMString}. */
const DOMString UpnpStateVarRequest_get_CurrentVal(const UpnpStateVarRequest *p); EXPORT_SPEC const DOMString UpnpStateVarRequest_get_CurrentVal(const UpnpStateVarRequest *p);
void UpnpStateVarRequest_set_CurrentVal(UpnpStateVarRequest *p, const DOMString s); EXPORT_SPEC void UpnpStateVarRequest_set_CurrentVal(UpnpStateVarRequest *p, const DOMString s);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -4,6 +4,16 @@
#define SUBSCRIPTIONREQUEST_H #define SUBSCRIPTIONREQUEST_H
/*!
* \file
*
* \brief UpnpSubscriptionRequest object declararion.
*
* \author Marcelo Roberto Jimenez
*
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -13,35 +23,36 @@ extern "C" {
typedef struct s_UpnpSubscriptionRequest UpnpSubscriptionRequest; typedef struct s_UpnpSubscriptionRequest UpnpSubscriptionRequest;
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#include "UpnpString.h" #include "UpnpString.h"
/** Constructor */ /** Constructor */
UpnpSubscriptionRequest *UpnpSubscriptionRequest_new(); EXPORT_SPEC UpnpSubscriptionRequest *UpnpSubscriptionRequest_new();
/** Destructor */ /** Destructor */
void UpnpSubscriptionRequest_delete(UpnpSubscriptionRequest *p); EXPORT_SPEC void UpnpSubscriptionRequest_delete(UpnpSubscriptionRequest *p);
/** Copy Constructor */ /** Copy Constructor */
UpnpSubscriptionRequest *UpnpSubscriptionRequest_dup(const UpnpSubscriptionRequest *p); EXPORT_SPEC UpnpSubscriptionRequest *UpnpSubscriptionRequest_dup(const UpnpSubscriptionRequest *p);
/** Assignment operator */ /** Assignment operator */
void UpnpSubscriptionRequest_assign(UpnpSubscriptionRequest *q, const UpnpSubscriptionRequest *p); EXPORT_SPEC void UpnpSubscriptionRequest_assign(UpnpSubscriptionRequest *q, const UpnpSubscriptionRequest *p);
/** The identifier for the service being subscribed to. */ /** The identifier for the service being subscribed to. */
const UpnpString *UpnpSubscriptionRequest_get_ServiceId(const UpnpSubscriptionRequest *p); EXPORT_SPEC const UpnpString *UpnpSubscriptionRequest_get_ServiceId(const UpnpSubscriptionRequest *p);
void UpnpSubscriptionRequest_set_ServiceId(UpnpSubscriptionRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpSubscriptionRequest_set_ServiceId(UpnpSubscriptionRequest *p, const UpnpString *s);
void UpnpSubscriptionRequest_strcpy_ServiceId(UpnpSubscriptionRequest *p, const char *s); EXPORT_SPEC void UpnpSubscriptionRequest_strcpy_ServiceId(UpnpSubscriptionRequest *p, const char *s);
/** Universal device name. */ /** Universal device name. */
const UpnpString *UpnpSubscriptionRequest_get_UDN(const UpnpSubscriptionRequest *p); EXPORT_SPEC const UpnpString *UpnpSubscriptionRequest_get_UDN(const UpnpSubscriptionRequest *p);
void UpnpSubscriptionRequest_set_UDN(UpnpSubscriptionRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpSubscriptionRequest_set_UDN(UpnpSubscriptionRequest *p, const UpnpString *s);
void UpnpSubscriptionRequest_strcpy_UDN(UpnpSubscriptionRequest *p, const char *s); EXPORT_SPEC void UpnpSubscriptionRequest_strcpy_UDN(UpnpSubscriptionRequest *p, const char *s);
/** The assigned subscription ID for this subscription. */ /** The assigned subscription ID for this subscription. */
const UpnpString *UpnpSubscriptionRequest_get_SID(const UpnpSubscriptionRequest *p); EXPORT_SPEC const UpnpString *UpnpSubscriptionRequest_get_SID(const UpnpSubscriptionRequest *p);
void UpnpSubscriptionRequest_set_SID(UpnpSubscriptionRequest *p, const UpnpString *s); EXPORT_SPEC void UpnpSubscriptionRequest_set_SID(UpnpSubscriptionRequest *p, const UpnpString *s);
void UpnpSubscriptionRequest_strcpy_SID(UpnpSubscriptionRequest *p, const char *s); EXPORT_SPEC void UpnpSubscriptionRequest_strcpy_SID(UpnpSubscriptionRequest *p, const char *s);
#ifdef __cplusplus #ifdef __cplusplus

122
upnp/inc/UpnpGlobal.h Normal file
View File

@@ -0,0 +1,122 @@
#ifndef UPNPGLOBAL_H
#define UPNPGLOBAL_H
/*!
* \file
*
* \brief The purpose of this file is to define constants that for some reason
* might not be defined on every system.
*/
#if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
#if defined __GNUC__
#warning libupnp requires largefile mode - use AC_SYS_LARGEFILE
#else
#error libupnp requires largefile mode - use AC_SYS_LARGEFILE
#endif
#endif
#ifdef WIN32
/*
* EXPORT_SPEC
*/
#ifndef UPNP_STATIC_LIB
#ifdef LIBUPNP_EXPORTS
/*! set up declspec for dll export to make functions
* visible to library users */
#define EXPORT_SPEC __declspec(dllexport)
#else /* LIBUPNP_EXPORTS */
#define EXPORT_SPEC __declspec(dllimport)
#endif /* LIBUPNP_EXPORTS */
#else /* UPNP_STATIC_LIB */
#define EXPORT_SPEC
#endif /* UPNP_STATIC_LIB */
/*
* UPNP_INLINE
* PRId64
* PRIzu
*/
#ifdef UPNP_USE_MSVCPP
/* define some things the M$ VC++ doesn't know */
#define UPNP_INLINE
typedef __int64 int64_t;
#define PRId64 "I64d"
#define PRIzu "lu"
#endif /* UPNP_USE_MSVCPP */
#ifdef UPNP_USE_BCBPP
/* define some things Borland Builder doesn't know */
#define UPNP_INLINE inline
typedef __int64 int64_t;
#warning The Borland C compiler is probably broken on PRId64,
#warning please someone provide a proper fix here
#define PRId64 "I64d"
#define PRIzu "zu"
#endif /* UPNP_USE_BCBPP */
#ifdef __GNUC__
#define UPNP_INLINE inline
/* Note with PRIzu that in the case of Mingw32, it's the MS C
* runtime printf which ends up getting called, not the glibc
* printf, so it genuinely doesn't have "zu"
*/
#define PRIzu "lu"
#endif /* __GNUC__ */
#else
/*!
* \brief Export functions on WIN32 DLLs.
*
* Every funtion that belongs to the library API must use this
* definition upon declaration or it will not be exported on WIN32
* DLLs.
*/
#define EXPORT_SPEC
/*!
* \brief Declares an inline function.
*
* Surprisingly, there are some compilers that do not understand the
* inline keyword. This definition makes the use of this keyword
* portable to these systems.
*/
#define UPNP_INLINE inline
/*!
* \brief Supply the PRId64 printf() macro.
*
* MSVC still does not know about this.
*/
#define PRId64 PRId64
/*!
* \brief Supply the PRIzu printf() macro.
*
* This macro was invented so that we can live a little longer with
* MSVC lack of C99. "z" is the correct printf() size specifier for
* the size_t type.
*/
#define PRIzu "zu"
#endif
/*
* Defining this macro here gives some interesting information about unused
* functions in the code. Of course, this should never go uncommented on a
* release.
*/
/*#define inline*/
#endif /* UPNPGLOBAL_H */

View File

@@ -7,20 +7,23 @@
/*! /*!
* \file * \file
* *
* \defgroup UpnpString The UpnpString Class * \brief UpnpString object declararion.
*
* This class implements string operations in the UPnP library.
* *
* \author Marcelo Roberto Jimenez * \author Marcelo Roberto Jimenez
* *
* \version 1.0 * \version 1.0
* *
* \brief String implementation for the UPnP library. * \defgroup UpnpString The UpnpString Class
*
* This class implements string operations in the UPnP library.
* *
* @{ * @{
*/ */
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
@@ -37,13 +40,13 @@ typedef struct s_UpnpString UpnpString;
* *
* \return A pointer to a new allocated object. * \return A pointer to a new allocated object.
*/ */
UpnpString *UpnpString_new(); EXPORT_SPEC UpnpString *UpnpString_new();
/*! /*!
* \brief Destructor. * \brief Destructor.
*/ */
void UpnpString_delete( EXPORT_SPEC void UpnpString_delete(
/*! \em \b this pointer. */ /*! \em \b this pointer. */
UpnpString *p); UpnpString *p);
@@ -53,7 +56,7 @@ void UpnpString_delete(
* *
* \return A pointer to a new allocated copy of the original object. * \return A pointer to a new allocated copy of the original object.
*/ */
UpnpString *UpnpString_dup( EXPORT_SPEC UpnpString *UpnpString_dup(
/*! \em \b this pointer. */ /*! \em \b this pointer. */
const UpnpString *p); const UpnpString *p);
@@ -61,7 +64,7 @@ UpnpString *UpnpString_dup(
/*! /*!
* \brief Assignment operator. * \brief Assignment operator.
*/ */
void UpnpString_assign( EXPORT_SPEC void UpnpString_assign(
/*! \em \b this pointer. */ /*! \em \b this pointer. */
UpnpString *p, UpnpString *p,
/*! Pointer to the right hand side object. */ /*! Pointer to the right hand side object. */
@@ -73,7 +76,7 @@ void UpnpString_assign(
* *
* \return The length of the string. * \return The length of the string.
* */ * */
int UpnpString_get_Length( EXPORT_SPEC int UpnpString_get_Length(
/*! \em \b this pointer. */ /*! \em \b this pointer. */
const UpnpString *p); const UpnpString *p);
@@ -83,7 +86,7 @@ int UpnpString_get_Length(
* *
* \return The pointer to char. * \return The pointer to char.
*/ */
const char *UpnpString_get_String( EXPORT_SPEC const char *UpnpString_get_String(
/*! \em \b this pointer. */ /*! \em \b this pointer. */
const UpnpString *p); const UpnpString *p);
@@ -91,7 +94,7 @@ const char *UpnpString_get_String(
/*! /*!
* \brief Sets the string from a pointer to char. * \brief Sets the string from a pointer to char.
*/ */
void UpnpString_set_String( EXPORT_SPEC void UpnpString_set_String(
/*! \em \b this pointer. */ /*! \em \b this pointer. */
UpnpString *p, UpnpString *p,
/*! (char *) to copy from. */ /*! (char *) to copy from. */
@@ -101,7 +104,7 @@ void UpnpString_set_String(
/*! /*!
* \brief Sets the string from a pointer to char using a maximum of N chars. * \brief Sets the string from a pointer to char using a maximum of N chars.
*/ */
void UpnpString_set_StringN( EXPORT_SPEC void UpnpString_set_StringN(
/*! \em \b this pointer. */ /*! \em \b this pointer. */
UpnpString *p, UpnpString *p,
/*! (char *) to copy from. */ /*! (char *) to copy from. */
@@ -113,7 +116,7 @@ void UpnpString_set_StringN(
/*! /*!
* \brief Clears the string, sets its size to zero. * \brief Clears the string, sets its size to zero.
*/ */
void UpnpString_clear( EXPORT_SPEC void UpnpString_clear(
/*! \em \b this pointer. */ /*! \em \b this pointer. */
UpnpString *p); UpnpString *p);

View File

@@ -43,17 +43,9 @@
*/ */
#if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
#if defined __GNUC__
#warning libupnp requires largefile mode - use AC_SYS_LARGEFILE
#else
#error libupnp requires largefile mode - use AC_SYS_LARGEFILE
#endif
#endif
#include "ixml.h" #include "ixml.h"
#include "upnpconfig.h" #include "upnpconfig.h"
#include "UpnpGlobal.h"
#include <stdio.h> #include <stdio.h>
@@ -71,61 +63,6 @@
#endif #endif
#ifdef WIN32
#ifndef UPNP_STATIC_LIB
#ifdef LIBUPNP_EXPORTS
/* set up declspec for dll export to make functions visible to library users */
#define EXPORT_SPEC __declspec(dllexport)
#else /* LIBUPNP_EXPORTS */
#define EXPORT_SPEC __declspec(dllimport)
#endif /* LIBUPNP_EXPORTS */
#else /* UPNP_STATIC_LIB */
#define EXPORT_SPEC
#endif /* UPNP_STATIC_LIB */
#ifdef UPNP_USE_MSVCPP
/* define some things the M$ VC++ doesn't know */
#define UPNP_INLINE
typedef __int64 int64_t;
#define PRId64 "I64d"
#define PRIzu "lu"
#endif /* UPNP_USE_MSVCPP */
#ifdef UPNP_USE_BCBPP
/* define some things Borland Builder doesn't know */
#define UPNP_INLINE inline
typedef __int64 int64_t;
#warning The Borland C compiler is probably broken on PRId64, please someone provide a proper fix here
#define PRId64 "I64d"
#define PRIzu "zu"
#endif /* UPNP_USE_BCBPP */
#ifdef __GNUC__
#define UPNP_INLINE inline
/* Note with PRIzu that in the case of Mingw32, it's the MS C
* runtime printf which ends up getting called, not the glibc
* printf, so it genuinely doesn't have "zu"
*/
#define PRIzu "lu"
#endif
#else
#define EXPORT_SPEC
#define UPNP_INLINE inline
/* Invented this macro so that we can live a little longer with MSVC lack of C99. */
#define PRIzu "zu"
#endif
/*
* Defining this macro here gives some interesting information about unused
* functions in the code. Of course, this should never go uncommented on a
* release.
*/
/*#define inline*/
#ifdef WIN32 #ifdef WIN32
#define UpnpCloseSocket closesocket #define UpnpCloseSocket closesocket
#define fseeko fseek #define fseeko fseek

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpActionComplete object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"
@@ -10,11 +20,18 @@
#include <string.h> /* for strlen(), strdup() */ #include <string.h> /* for strlen(), strdup() */
/*!
* \brief Internal implementation of the UpnpActionComplete object.
*/
struct SUpnpActionComplete struct SUpnpActionComplete
{ {
/*! The result of the operation */
int m_errCode; int m_errCode;
/*! The control URL for service. */
UpnpString *m_ctrlUrl; UpnpString *m_ctrlUrl;
/*! The DOM document describing the action. */
IXML_Document *m_actionRequest; IXML_Document *m_actionRequest;
/*! The DOM document describing the result of the action */
IXML_Document *m_actionResult; IXML_Document *m_actionResult;
}; };

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpActionRequest object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpDiscovery object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpEvent object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpEventSubscribe object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpFileInfo object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpStateVarComplete object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpStateVarRequest object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpSubscriptionRequest object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"

View File

@@ -1,5 +1,15 @@
/*!
* \file
*
* \brief UpnpString object implementation.
*
* \author Marcelo Roberto Jimenez
*
*/
#include "config.h" #include "config.h"