gena.h File Reference

#include "config.h"
#include "service_table.h"
#include "miniserver.h"
#include "uri.h"
#include "upnp.h"
#include <time.h>
#include "ThreadPool.h"
#include <string.h>
#include "client_table.h"
#include "httpparser.h"
#include "sock.h"

Go to the source code of this file.

Data Structures

struct  NOTIFY_THREAD_STRUCT

Defines

#define XML_VERSION   "<?xml version='1.0' encoding='ISO-8859-1' ?>\n"
#define XML_PROPERTYSET_HEADER   "<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n"
#define UNABLE_MEMORY   "HTTP/1.1 500 Internal Server Error\r\n\r\n"
#define UNABLE_SERVICE_UNKNOWN   "HTTP/1.1 404 Not Found\r\n\r\n"
#define UNABLE_SERVICE_NOT_ACCEPT   "HTTP/1.1 503 Service Not Available\r\n\r\n"
#define NOT_IMPLEMENTED   "HTTP/1.1 501 Not Implemented\r\n\r\n"
#define BAD_REQUEST   "HTTP/1.1 400 Bad Request\r\n\r\n"
#define INVALID_NT   BAD_CALLBACK
#define BAD_CALLBACK   "HTTP/1.1 412 Precondition Failed\r\n\r\n"
#define HTTP_OK_CRLF   "HTTP/1.1 200 OK\r\n\r\n"
#define HTTP_OK_STR   "HTTP/1.1 200 OK\r\n"
#define INVALID_SID   BAD_CALLBACK
#define MISSING_SID   BAD_CALLBACK
#define MAX_CONTENT_LENGTH   20
#define MAX_SECONDS   10
#define MAX_EVENTS   20
#define MAX_PORT_SIZE   10
#define GENA_E_BAD_RESPONSE   UPNP_E_BAD_RESPONSE
#define GENA_E_BAD_SERVICE   UPNP_E_INVALID_SERVICE
#define GENA_E_SUBSCRIPTION_UNACCEPTED   UPNP_E_SUBSCRIBE_UNACCEPTED
#define GENA_E_BAD_SID   UPNP_E_INVALID_SID
#define GENA_E_UNSUBSCRIBE_UNACCEPTED   UPNP_E_UNSUBSCRIBE_UNACCEPTED
#define GENA_E_NOTIFY_UNACCEPTED   UPNP_E_NOTIFY_UNACCEPTED
#define GENA_E_NOTIFY_UNACCEPTED_REMOVE_SUB   -9
#define GENA_E_BAD_HANDLE   UPNP_E_INVALID_HANDLE
#define XML_ERROR   -5
#define XML_SUCCESS   UPNP_E_SUCCESS
#define GENA_SUCCESS   UPNP_E_SUCCESS
#define CALLBACK_SUCCESS   0
#define DEFAULT_TIMEOUT   1801
#define SubscribeLock()
#define SubscribeUnlock()

Typedefs

typedef struct NOTIFY_THREAD_STRUCT notify_thread_struct

Functions

EXTERN_C void genaCallback (IN http_parser_t *parser, IN http_message_t *request, IN SOCKINFO *info)
 CLIENTONLY (EXTERN_C int genaSubscribe(UpnpClient_Handle client_handle, char *PublisherURL, int *TimeOut, Upnp_SIDout_sid);) CLIENTONLY(EXTERN_C int genaUnSubscribe(UpnpClient_Handle client_handle
 CLIENTONLY (EXTERN_C int genaUnregisterClient(UpnpClient_Handle client_handle);) DEVICEONLY(EXTERN_C int genaUnregisterDevice(UpnpDevice_Handle device_handle)
 CLIENTONLY (EXTERN_C int genaRenewSubscription(IN UpnpClient_Handle client_handle, IN const Upnp_SID in_sid, OUT int *TimeOut);) DEVICEONLY(EXTERN_C int genaNotifyAll(UpnpDevice_Handle device_handle
 DEVICEONLY (EXTERN_C int genaNotifyAllExt(UpnpDevice_Handle device_handle, char *UDN, char *servId, IN IXML_Document *PropSet);) DEVICEONLY(EXTERN_C int genaInitNotify(IN UpnpDevice_Handle device_handle
 DEVICEONLY (EXTERN_C int genaInitNotifyExt(IN UpnpDevice_Handle device_handle, IN char *UDN, IN char *servId, IN IXML_Document *PropSet, IN Upnp_SID sid);) void error_respond(IN SOCKINFO *info

Variables

ithread_mutex_t GlobalClientSubscribeMutex
const Upnp_SID in_sid
char * UDN
char char * servId
char char char ** VarNames
char char char char ** VarValues
char char char char int var_count
IN char IN char IN char IN
char IN int IN Upnp_SID 
sid
IN int error_code
IN int IN http_message_thmsg

Define Documentation

#define BAD_CALLBACK   "HTTP/1.1 412 Precondition Failed\r\n\r\n"

Definition at line 68 of file gena.h.

#define BAD_REQUEST   "HTTP/1.1 400 Bad Request\r\n\r\n"

Definition at line 66 of file gena.h.

#define CALLBACK_SUCCESS   0

Definition at line 88 of file gena.h.

#define DEFAULT_TIMEOUT   1801

Definition at line 89 of file gena.h.

#define GENA_E_BAD_HANDLE   UPNP_E_INVALID_HANDLE

Definition at line 84 of file gena.h.

#define GENA_E_BAD_RESPONSE   UPNP_E_BAD_RESPONSE

Definition at line 77 of file gena.h.

#define GENA_E_BAD_SERVICE   UPNP_E_INVALID_SERVICE

Definition at line 78 of file gena.h.

#define GENA_E_BAD_SID   UPNP_E_INVALID_SID

Definition at line 80 of file gena.h.

#define GENA_E_NOTIFY_UNACCEPTED   UPNP_E_NOTIFY_UNACCEPTED

Definition at line 82 of file gena.h.

#define GENA_E_NOTIFY_UNACCEPTED_REMOVE_SUB   -9

Definition at line 83 of file gena.h.

#define GENA_E_SUBSCRIPTION_UNACCEPTED   UPNP_E_SUBSCRIBE_UNACCEPTED

Definition at line 79 of file gena.h.

#define GENA_E_UNSUBSCRIBE_UNACCEPTED   UPNP_E_UNSUBSCRIBE_UNACCEPTED

Definition at line 81 of file gena.h.

#define GENA_SUCCESS   UPNP_E_SUCCESS

Definition at line 87 of file gena.h.

#define HTTP_OK_CRLF   "HTTP/1.1 200 OK\r\n\r\n"

Definition at line 69 of file gena.h.

#define HTTP_OK_STR   "HTTP/1.1 200 OK\r\n"

Definition at line 70 of file gena.h.

#define INVALID_NT   BAD_CALLBACK

Definition at line 67 of file gena.h.

#define INVALID_SID   BAD_CALLBACK

Definition at line 71 of file gena.h.

#define MAX_CONTENT_LENGTH   20

Definition at line 73 of file gena.h.

#define MAX_EVENTS   20

Definition at line 75 of file gena.h.

#define MAX_PORT_SIZE   10

Definition at line 76 of file gena.h.

#define MAX_SECONDS   10

Definition at line 74 of file gena.h.

#define MISSING_SID   BAD_CALLBACK

Definition at line 72 of file gena.h.

#define NOT_IMPLEMENTED   "HTTP/1.1 501 Not Implemented\r\n\r\n"

Definition at line 65 of file gena.h.

 
#define SubscribeLock (  ) 
Value:
DBGONLY(UpnpPrintf(UPNP_INFO,GENA,__FILE__,__LINE__, \
        "Trying Subscribe Lock"));  \
        ithread_mutex_lock(&GlobalClientSubscribeMutex); \
        DBGONLY(UpnpPrintf(UPNP_INFO,GENA,__FILE__,__LINE__,"Subscribe Lock");)

Definition at line 96 of file gena.h.

 
#define SubscribeUnlock (  ) 
Value:
DBGONLY(UpnpPrintf(UPNP_INFO,GENA,__FILE__,__LINE__, \
                "Trying Subscribe UnLock")); \
        ithread_mutex_unlock(&GlobalClientSubscribeMutex); \
        DBGONLY(UpnpPrintf(UPNP_INFO,GENA,__FILE__,__LINE__,"Subscribe UnLock");)

Definition at line 103 of file gena.h.

#define UNABLE_MEMORY   "HTTP/1.1 500 Internal Server Error\r\n\r\n"

Definition at line 59 of file gena.h.

#define UNABLE_SERVICE_NOT_ACCEPT   "HTTP/1.1 503 Service Not Available\r\n\r\n"

Definition at line 61 of file gena.h.

#define UNABLE_SERVICE_UNKNOWN   "HTTP/1.1 404 Not Found\r\n\r\n"

Definition at line 60 of file gena.h.

#define XML_ERROR   -5

Definition at line 85 of file gena.h.

#define XML_PROPERTYSET_HEADER   "<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n"

Definition at line 56 of file gena.h.

#define XML_SUCCESS   UPNP_E_SUCCESS

Definition at line 86 of file gena.h.

#define XML_VERSION   "<?xml version='1.0' encoding='ISO-8859-1' ?>\n"

Definition at line 55 of file gena.h.


Typedef Documentation


Function Documentation

CLIENTONLY ( EXTERN_C int genaRenewSubscription(IN UpnpClient_Handle client_handle, IN const Upnp_SID in_sid, OUT int *TimeOut);   ) 
CLIENTONLY ( EXTERN_C int genaUnregisterClient(UpnpClient_Handle client_handle);   ) 
CLIENTONLY ( EXTERN_C int genaSubscribe(UpnpClient_Handle client_handle, char *PublisherURL, int *TimeOut, Upnp_SIDout_sid);   ) 
DEVICEONLY ( EXTERN_C int genaInitNotifyExt(IN UpnpDevice_Handle device_handle, IN char *UDN, IN char *servId, IN IXML_Document *PropSet, IN Upnp_SID sid);   ) 
DEVICEONLY ( EXTERN_C int genaNotifyAllExt(UpnpDevice_Handle device_handle, char *UDN, char *servId, IN IXML_Document *PropSet);   ) 
EXTERN_C void genaCallback ( IN http_parser_t parser,
IN http_message_t request,
IN SOCKINFO info 
)

Variable Documentation

IN int error_code

Definition at line 368 of file gena.h.

Referenced by WebRequestHandler::open().

IN int IN http_message_t* hmsg

Definition at line 368 of file gena.h.

Definition at line 188 of file gena.h.

IN char IN char * servId

Definition at line 269 of file gena.h.

IN char IN char IN char IN char IN int IN Upnp_SID sid

Definition at line 318 of file gena.h.

Referenced by WebRequestHandler::check_request(), main(), and web::auth::process().

IN char * UDN

Definition at line 269 of file gena.h.

IN char IN char IN char IN char IN int var_count

Definition at line 269 of file gena.h.

IN char IN char IN char ** VarNames

Definition at line 269 of file gena.h.

IN char IN char IN char IN char ** VarValues

Definition at line 269 of file gena.h.


Generated on Fri Mar 26 20:16:54 2010 for MediaTomb by  doxygen 1.6.1