White spaces.

git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@361 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2008-05-03 21:49:43 +00:00
parent d2c34a15de
commit be2fa49891

View File

@ -540,13 +540,11 @@ enum UpnpOpenFileMode
/** Returned when a control point application registers with {\bf /** Returned when a control point application registers with {\bf
* UpnpRegisterClient}. Client handles can only be used with * UpnpRegisterClient}. Client handles can only be used with
* functions that operate with a client handle. */ * functions that operate with a client handle. */
typedef int UpnpClient_Handle; typedef int UpnpClient_Handle;
/** Returned when a device application registers with {\bf /** Returned when a device application registers with {\bf
* UpnpRegisterRootDevice} or {\bf UpnpRegisterRootDevice2}. Device handles * UpnpRegisterRootDevice} or {\bf UpnpRegisterRootDevice2}. Device handles
* can only be used with functions that operate with a device handle. */ * can only be used with functions that operate with a device handle. */
typedef int UpnpDevice_Handle; typedef int UpnpDevice_Handle;
/** @name UPnP_EventType /** @name UPnP_EventType
@ -555,9 +553,7 @@ typedef int UpnpDevice_Handle;
reason for the callback. The descriptions for each event reason for the callback. The descriptions for each event
type describe the contents of the {\bf Event} parameter. type describe the contents of the {\bf Event} parameter.
*/ */
enum Upnp_EventType_e { enum Upnp_EventType_e {
/* /*
* Control callbacks * Control callbacks
*/ */
@ -566,26 +562,22 @@ enum Upnp_EventType_e {
* request. The {\bf Event} parameter contains a pointer to a {\bf * request. The {\bf Event} parameter contains a pointer to a {\bf
* UpnpActionRequest} structure containing the action. The application * UpnpActionRequest} structure containing the action. The application
* stores the results of the action in this structure. */ * stores the results of the action in this structure. */
UPNP_CONTROL_ACTION_REQUEST, UPNP_CONTROL_ACTION_REQUEST,
/** A {\bf UpnpSendActionAsync} call completed. The {\bf Event} /** A {\bf UpnpSendActionAsync} call completed. The {\bf Event}
* parameter contains a pointer to a {\bf UpnpActionComplete} structure * parameter contains a pointer to a {\bf UpnpActionComplete} structure
* with the results of the action. */ * with the results of the action. */
UPNP_CONTROL_ACTION_COMPLETE, UPNP_CONTROL_ACTION_COMPLETE,
/** Received by a device when a query for a single service variable /** Received by a device when a query for a single service variable
* arrives. The {\bf Event} parameter contains a pointer to a {\bf * arrives. The {\bf Event} parameter contains a pointer to a {\bf
* UpnpStateVarRequest} structure containing the name of the variable * UpnpStateVarRequest} structure containing the name of the variable
* and value. */ * and value. */
UPNP_CONTROL_GET_VAR_REQUEST, UPNP_CONTROL_GET_VAR_REQUEST,
/** A {\bf UpnpGetServiceVarStatus} call completed. The {\bf Event} /** A {\bf UpnpGetServiceVarStatus} call completed. The {\bf Event}
* parameter contains a pointer to a {\bf UpnpStateVarComplete} structure * parameter contains a pointer to a {\bf UpnpStateVarComplete} structure
* containing the value for the variable. */ * containing the value for the variable. */
UPNP_CONTROL_GET_VAR_COMPLETE, UPNP_CONTROL_GET_VAR_COMPLETE,
/* /*
@ -596,27 +588,23 @@ enum Upnp_EventType_e {
* The {\bf Event} parameter contains a pointer to a {\bf * The {\bf Event} parameter contains a pointer to a {\bf
* UpnpDiscovery} structure with the information about the device * UpnpDiscovery} structure with the information about the device
* or service. */ * or service. */
UPNP_DISCOVERY_ADVERTISEMENT_ALIVE, UPNP_DISCOVERY_ADVERTISEMENT_ALIVE,
/** Received by a control point when a device or service shuts down. The {\bf /** Received by a control point when a device or service shuts down. The {\bf
* Event} parameter contains a pointer to a {\bf UpnpDiscovery} * Event} parameter contains a pointer to a {\bf UpnpDiscovery}
* structure containing the information about the device or * structure containing the information about the device or
* service. */ * service. */
UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE, UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE,
/** Received by a control point when a matching device or service responds. /** Received by a control point when a matching device or service responds.
* The {\bf Event} parameter contains a pointer to a {\bf * The {\bf Event} parameter contains a pointer to a {\bf
* UpnpDiscovery} structure containing the information about * UpnpDiscovery} structure containing the information about
* the reply to the search request. */ * the reply to the search request. */
UPNP_DISCOVERY_SEARCH_RESULT, UPNP_DISCOVERY_SEARCH_RESULT,
/** Received by a control point when the search timeout expires. The /** Received by a control point when the search timeout expires. The
* SDK generates no more callbacks for this search after this * SDK generates no more callbacks for this search after this
* event. The {\bf Event} parameter is {\tt NULL}. */ * event. The {\bf Event} parameter is {\tt NULL}. */
UPNP_DISCOVERY_SEARCH_TIMEOUT, UPNP_DISCOVERY_SEARCH_TIMEOUT,
/* /*
@ -632,47 +620,39 @@ enum Upnp_EventType_e {
* generates no events for a subscription unless the device * generates no events for a subscription unless the device
* application calls {\bf UpnpAcceptSubscription}. * application calls {\bf UpnpAcceptSubscription}.
*/ */
UPNP_EVENT_SUBSCRIPTION_REQUEST, UPNP_EVENT_SUBSCRIPTION_REQUEST,
/** Received by a control point when an event arrives. The {\bf /** Received by a control point when an event arrives. The {\bf
* Event} parameter contains a {\bf UpnpEvent} structure * Event} parameter contains a {\bf UpnpEvent} structure
* with the information about the event. */ * with the information about the event. */
UPNP_EVENT_RECEIVED, UPNP_EVENT_RECEIVED,
/** A {\bf UpnpRenewSubscriptionAsync} call completed. The status of /** A {\bf UpnpRenewSubscriptionAsync} call completed. The status of
* the renewal is in the {\bf Event} parameter as a {\bf * the renewal is in the {\bf Event} parameter as a {\bf
* Upnp_Event_Subscription} structure. */ * Upnp_Event_Subscription} structure. */
UPNP_EVENT_RENEWAL_COMPLETE, UPNP_EVENT_RENEWAL_COMPLETE,
/** A {\bf UpnpSubscribeAsync} call completed. The status of the /** A {\bf UpnpSubscribeAsync} call completed. The status of the
* subscription is in the {\bf Event} parameter as a {\bf * subscription is in the {\bf Event} parameter as a {\bf
* Upnp_Event_Subscription} structure. */ * Upnp_Event_Subscription} structure. */
UPNP_EVENT_SUBSCRIBE_COMPLETE, UPNP_EVENT_SUBSCRIBE_COMPLETE,
/** A {\bf UpnpUnSubscribeAsync} call completed. The status of the /** A {\bf UpnpUnSubscribeAsync} call completed. The status of the
* subscription is in the {\bf Event} parameter as a {\bf * subscription is in the {\bf Event} parameter as a {\bf
* EventSubscribe} structure. */ * EventSubscribe} structure. */
UPNP_EVENT_UNSUBSCRIBE_COMPLETE, UPNP_EVENT_UNSUBSCRIBE_COMPLETE,
/** The auto-renewal of a client subscription failed. /** The auto-renewal of a client subscription failed.
* The {\bf Event} parameter is a {\bf EventSubscribe} structure * The {\bf Event} parameter is a {\bf EventSubscribe} structure
* with the error code set appropriately. The subscription is no longer * with the error code set appropriately. The subscription is no longer
* valid. */ * valid. */
UPNP_EVENT_AUTORENEWAL_FAILED, UPNP_EVENT_AUTORENEWAL_FAILED,
/** A client subscription has expired. This will only occur /** A client subscription has expired. This will only occur
* if auto-renewal of subscriptions is disabled. * if auto-renewal of subscriptions is disabled.
* The {\bf Event} parameter is a {\bf EventSubscribe} * The {\bf Event} parameter is a {\bf EventSubscribe}
* structure. The subscription is no longer valid. */ * structure. The subscription is no longer valid. */
UPNP_EVENT_SUBSCRIPTION_EXPIRED UPNP_EVENT_SUBSCRIPTION_EXPIRED
}; };
typedef enum Upnp_EventType_e Upnp_EventType; typedef enum Upnp_EventType_e Upnp_EventType;
@ -681,7 +661,6 @@ typedef enum Upnp_EventType_e Upnp_EventType;
between a client and a device. The SID is a string representation of between a client and a device. The SID is a string representation of
a globally unique id (GUID) and should not be modified. a globally unique id (GUID) and should not be modified.
*/ */
typedef char Upnp_SID[44]; typedef char Upnp_SID[44];
/** @name Upnp_SType /** @name Upnp_SType
@ -692,7 +671,6 @@ typedef char Upnp_SID[44];
can control the scope of the search from all devices can control the scope of the search from all devices
to specific devices or services. to specific devices or services.
*/ */
enum Upnp_SType_e { enum Upnp_SType_e {
/** Search for all devices and services on the network. */ /** Search for all devices and services on the network. */
UPNP_S_ALL, UPNP_S_ALL,
@ -700,8 +678,7 @@ enum Upnp_SType_e {
/** Search for all root devices on the network. */ /** Search for all root devices on the network. */
UPNP_S_ROOT, UPNP_S_ROOT,
/** Search for a particular device type or a particular device /** Search for a particular device type or a particular device instance. */
instance. */
UPNP_S_DEVICE, UPNP_S_DEVICE,
/** Search for a particular service type, possibly on a particular /** Search for a particular service type, possibly on a particular
@ -734,7 +711,6 @@ typedef enum Upnp_DescType_e Upnp_DescType;
/* The type of handle returned by the web server for open requests. */ /* The type of handle returned by the web server for open requests. */
typedef void *UpnpWebFileHandle; typedef void *UpnpWebFileHandle;
/** The {\bf UpnpVirtualDirCallbacks} structure contains the pointers to /** The {\bf UpnpVirtualDirCallbacks} structure contains the pointers to
@ -746,20 +722,20 @@ struct UpnpVirtualDirCallbacks
/** Called by the web server to query information on a file. The callback /** Called by the web server to query information on a file. The callback
* should return 0 on success or -1 on an error. */ * should return 0 on success or -1 on an error. */
int (*get_info) ( int (*get_info) (
IN const char *filename, /** The name of the file to query. */ /** The name of the file to query. */
OUT UpnpFileInfo *info /** Pointer to a structure to store the IN const char *filename,
information on the file. */ /** Pointer to a structure to store the information on the file. */
); OUT UpnpFileInfo *info);
/** Called by the web server to open a file. The callback should return /** Called by the web server to open a file. The callback should return
* a valid handle if the file can be opened. Otherwise, it should return * a valid handle if the file can be opened. Otherwise, it should return
* {\tt NULL} to signify an error. */ * {\tt NULL} to signify an error. */
UpnpWebFileHandle (*open)( UpnpWebFileHandle (*open)(
IN const char *filename, /** The name of the file to open. */ /** The name of the file to open. */
IN enum UpnpOpenFileMode Mode /** The mode in which to open the file. IN const char *filename,
Valid values are {\tt UPNP_READ} or /** The mode in which to open the file.
{\tt UPNP_WRITE}. */ * Valid values are {\tt UPNP_READ} or {\tt UPNP_WRITE}. */
); IN enum UpnpOpenFileMode Mode);
/** Called by the web server to perform a sequential read from an open /** Called by the web server to perform a sequential read from an open
* file. The callback should copy {\bf buflen} bytes from the file into * file. The callback should copy {\bf buflen} bytes from the file into
@ -773,12 +749,12 @@ struct UpnpVirtualDirCallbacks
* \end{itemzie} * \end{itemzie}
*/ */
int (*read) ( int (*read) (
IN UpnpWebFileHandle fileHnd, /** The handle of the file to read. */ /** The handle of the file to read. */
OUT char *buf, /** The buffer in which to place the IN UpnpWebFileHandle fileHnd,
data. */ /** The buffer in which to place the data. */
IN size_t buflen /** The size of the buffer (i.e. the OUT char *buf,
number of bytes to read). */ /** The size of the buffer (i.e. the number of bytes to read). */
); IN size_t buflen);
/** Called by the web server to perform a sequential write to an open /** Called by the web server to perform a sequential write to an open
* file. The callback should write {\bf buflen} bytes into the file from * file. The callback should write {\bf buflen} bytes into the file from
@ -786,10 +762,12 @@ struct UpnpVirtualDirCallbacks
* which might be less than {\bf buflen} in the case of a write error. * which might be less than {\bf buflen} in the case of a write error.
*/ */
int (*write) ( int (*write) (
IN UpnpWebFileHandle fileHnd, /** The handle of the file to write. */ /** The handle of the file to write. */
IN char *buf, /** The buffer with the bytes to write. */ IN UpnpWebFileHandle fileHnd,
IN size_t buflen /** The number of bytes to write. */ /** The buffer with the bytes to write. */
); IN char *buf,
/** The number of bytes to write. */
IN size_t buflen);
/** Called by the web server to move the file pointer, or offset, into /** Called by the web server to move the file pointer, or offset, into
* an open file. The {\bf origin} parameter determines where to start * an open file. The {\bf origin} parameter determines where to start
@ -803,38 +781,35 @@ struct UpnpVirtualDirCallbacks
* should return 0 on a successful seek or a non-zero value on an error. * should return 0 on a successful seek or a non-zero value on an error.
*/ */
int (*seek) ( int (*seek) (
IN UpnpWebFileHandle fileHnd, /** The handle of the file to move the /** The handle of the file to move the file pointer. */
file pointer. */ IN UpnpWebFileHandle fileHnd,
IN off_t offset, /** The number of bytes to move in the /** The number of bytes to move in the file. Positive values
file. Positive values move foward and * move foward and negative values move backward. Note that
negative values move backward. Note * this must be positive if the {\bf origin} is {\tt SEEK_SET}. */
that this must be positive if the IN off_t offset,
{\bf origin} is {\tt SEEK_SET}. */ /** The position to move relative to. It can be {\tt SEEK_CUR}
IN int origin /** The position to move relative to. It * to move relative to the current position, {\tt SEEK_END} to
can be {\tt SEEK_CUR} to move relative * move relative to the end of the file, or {\tt SEEK_SET} to
to the current position, * specify an absolute offset. */
{\tt SEEK_END} to move relative to IN int origin);
the end of the file, or {\tt
SEEK_SET} to specify an absolute
offset. */
);
/** Called by the web server to close a file opened via the {\bf open} /** Called by the web server to close a file opened via the {\bf open}
* callback. It should return 0 on success, or a non-zero value on an * callback. It should return 0 on success, or a non-zero value on an
* error. * error.
*/ */
int (*close) ( int (*close) (
IN UpnpWebFileHandle fileHnd /** The handle of the file to close. */ /** The handle of the file to close. */
); IN UpnpWebFileHandle fileHnd);
}; };
typedef struct virtual_Dir_List typedef struct virtual_Dir_List
{ {
struct virtual_Dir_List *next; struct virtual_Dir_List *next;
char dirName[NAME_SIZE]; char dirName[NAME_SIZE];
} virtualDirList; } virtualDirList;
/** All callback functions share the same prototype, documented below. /** All callback functions share the same prototype, documented below.
* Note that any memory passed to the callback function * Note that any memory passed to the callback function
* is valid only during the callback and should be copied if it * is valid only during the callback and should be copied if it
@ -859,7 +834,6 @@ typedef struct virtual_Dir_List
* The return value of the callback is currently ignored. It may be used * The return value of the callback is currently ignored. It may be used
* in the future to communicate results back to the SDK. * in the future to communicate results back to the SDK.
*/ */
typedef int (*Upnp_FunPtr)(IN Upnp_EventType EventType, IN void *Event, IN void *Cookie); typedef int (*Upnp_FunPtr)(IN Upnp_EventType EventType, IN void *Event, IN void *Cookie);
/*! @} */ /* Constants, Structures, and Types */ /*! @} */ /* Constants, Structures, and Types */