socket/XmlBlasterAccessUnparsed.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <socket/xmlBlasterSocket.h>
#include <socket/xmlBlasterZlib.h>
#include <XmlBlasterAccessUnparsed.h>

Include dependency graph for XmlBlasterAccessUnparsed.c:

Go to the source code of this file.

Data Structures

struct  UpdateContainer
 Little helper to collect args for the new created thread. More...

Functions

static int initialize (XmlBlasterAccessUnparsed *xa, UpdateFp update, XmlBlasterException *exception)
static char * xmlBlasterConnect (XmlBlasterAccessUnparsed *xa, char *qos, UpdateFp update, XmlBlasterException *exception)
static int xmlBlasterDisconnect (XmlBlasterAccessUnparsed *xa, char *qos, XmlBlasterException *exception)
static char * xmlBlasterPublish (XmlBlasterAccessUnparsed *xa, MsgUnit *msgUnit, XmlBlasterException *exception)
 Publish a message to the server.
static QosArrxmlBlasterPublishArr (XmlBlasterAccessUnparsed *xa, MsgUnitArr *msgUnitArr, XmlBlasterException *exception)
 Publish a message array in a bulk to the server.
static void xmlBlasterPublishOneway (XmlBlasterAccessUnparsed *xa, MsgUnitArr *msgUnitArr, XmlBlasterException *exception)
 Publish a message array in a bulk to the server, we don't receive an ACK.
static char * xmlBlasterSubscribe (XmlBlasterAccessUnparsed *xa, char *key, char *qos, XmlBlasterException *exception)
 Subscribe a message.
static QosArrxmlBlasterUnSubscribe (XmlBlasterAccessUnparsed *xa, char *key, char *qos, XmlBlasterException *exception)
 UnSubscribe a message from the server.
static QosArrxmlBlasterErase (XmlBlasterAccessUnparsed *xa, char *key, char *qos, XmlBlasterException *exception)
 Erase a message from the server.
static MsgUnitArrxmlBlasterGet (XmlBlasterAccessUnparsed *xa, char *key, char *qos, XmlBlasterException *exception)
 Get a message.
static char * xmlBlasterPing (XmlBlasterAccessUnparsed *xa, char *qos, XmlBlasterException *exception)
 Ping the server.
static int isConnected (XmlBlasterAccessUnparsed *xa)
static void responseEvent (MsgRequestInfo *msgRequestInfoP, void *socketDataHolder)
 This function is called by the callback server when a response message arrived (after we send a request).
static MsgRequestInfopreSendEvent (MsgRequestInfo *msgRequestInfoP, XmlBlasterException *exception)
 Callback from XmlBlasterConnectionUnparsed just before a message is sent, the msgRequestInfo contains the requestId used.
static MsgRequestInfopostSendEvent (MsgRequestInfo *msgRequestInfoP, XmlBlasterException *exception)
 Callback function (wait for response) called directly after a message is sent.
static int checkArgs (XmlBlasterAccessUnparsed *xa, char *methodName, int checkIsConnected, XmlBlasterException *exception)
static void interceptUpdate (MsgUnitArr *msgUnitArrP, void *userData, XmlBlasterException *exception, void *socketDataHolder)
 Here we receive the callback messages from xmlBlaster, create a thread and dispatch it to the clients update.
static int mutexUnlock (MsgRequestInfo *msgRequestInfoP, XmlBlasterException *exception)
 Free lock.
static ssize_t writenPlain (void *userP, int fd, char *ptr, size_t nbytes)
 Write uncompressed to socket (thread safe).
static ssize_t writenCompressed (void *userP, int fd, char *ptr, size_t nbytes)
 Compress data and send to socket.
static ssize_t readnPlain (void *userP, int fd, char *ptr, size_t nbytes, XmlBlasterNumReadFunc fpNumRead, void *userP2)
 Read uncompressed to socket (thread safe).
static ssize_t readnCompressed (void *userP, int fd, char *ptr, size_t nbytes, XmlBlasterNumReadFunc fpNumRead, void *userP2)
 Read data from socket, uncompress it if necessary.
XmlBlasterAccessUnparsedgetXmlBlasterAccessUnparsed (int argc, char **argv)
void freeXmlBlasterAccessUnparsed (XmlBlasterAccessUnparsed *xa)
 Free your instance after accessing xmlBlaster.
char * xmlBlasterAccessUnparsedUsage (char *usage)
 Help usage.
static int runUpdate (UpdateContainer *container)
 Run by the new created thread, calls the clients update method.


Function Documentation

static int checkArgs ( XmlBlasterAccessUnparsed xa,
char *  methodName,
int  checkIsConnected,
XmlBlasterException exception 
) [static]

Definition at line 820 of file XmlBlasterAccessUnparsed.c.

References ExceptionStruct::errorCode, getStackTrace(), initializeXmlBlasterException(), XmlBlasterAccessUnparsed::isConnected, XmlBlasterAccessUnparsed::isShutdown, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, ExceptionStruct::message, SNPRINTF, strncpy0(), XMLBLASTER_LOG_ERROR, XMLBLASTER_LOG_WARN, XMLBLASTEREXCEPTION_ERRORCODE_LEN, and XMLBLASTEREXCEPTION_MESSAGE_LEN.

Here is the call graph for this function:

void freeXmlBlasterAccessUnparsed ( XmlBlasterAccessUnparsed xa  ) 

Free your instance after accessing xmlBlaster.

Definition at line 136 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::callbackP, XmlBlasterAccessUnparsed::callbackThreadId, XmlBlasterAccessUnparsed::connectionP, freeCallbackServerUnparsed(), freeProperties(), freeXmlBlasterConnectionUnparsed(), get_pthread_id(), PropertiesStruct::getBool, getStackTrace(), CallbackServerUnparsedStruct::isShutdown, XmlBlasterAccessUnparsed::isShutdown, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, XmlBlasterAccessUnparsed::props, XmlBlasterAccessUnparsed::readnMutex, XmlBlasterConnectionUnparsedStruct::shutdown, CallbackServerUnparsedStruct::shutdown, sleepMillis(), XmlBlasterAccessUnparsed::threadCounter, XmlBlasterAccessUnparsed::writenMutex, XMLBLASTER_LOG_ERROR, XMLBLASTER_LOG_INFO, XMLBLASTER_LOG_TRACE, and XMLBLASTER_LOG_WARN.

Referenced by freeXmlBlasterAccessUnparsedUnmanaged(), freeXmlBlasterAccessUnparsedUnmanagedCE(), getXmlBlasterAccessUnparsed(), main(), and myUpdate().

Here is the call graph for this function:

XmlBlasterAccessUnparsed* getXmlBlasterAccessUnparsed ( int  argc,
char **  argv 
)

Definition at line 74 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::argc, XmlBlasterAccessUnparsed::argv, XmlBlasterAccessUnparsed::callbackMultiThreaded, XmlBlasterAccessUnparsed::callbackP, XmlBlasterAccessUnparsed::callbackThreadId, XmlBlasterAccessUnparsed::clientsUpdateFp, XmlBlasterAccessUnparsed::connect, XmlBlasterAccessUnparsed::connectionP, createProperties(), XmlBlasterAccessUnparsed::disconnect, XmlBlasterAccessUnparsed::erase, freeXmlBlasterAccessUnparsed(), XmlBlasterAccessUnparsed::get, PropertiesStruct::getBool, getLogLevelStr(), PropertiesStruct::getLong, PropertiesStruct::getString, initialize(), XmlBlasterAccessUnparsed::initialize, isConnected(), XmlBlasterAccessUnparsed::isConnected, XmlBlasterAccessUnparsed::isInitialized, XmlBlasterAccessUnparsed::isShutdown, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, XmlBlasterAccessUnparsed::lowLevelAutoAck, parseLogLevel(), XmlBlasterAccessUnparsed::ping, XmlBlasterAccessUnparsed::props, XmlBlasterAccessUnparsed::publish, XmlBlasterAccessUnparsed::publishArr, XmlBlasterAccessUnparsed::publishOneway, XmlBlasterAccessUnparsed::readnMutex, XmlBlasterAccessUnparsed::responseTimeout, XmlBlasterAccessUnparsed::subscribe, XmlBlasterAccessUnparsed::threadCounter, XmlBlasterAccessUnparsed::unSubscribe, XmlBlasterAccessUnparsed::userFp, XmlBlasterAccessUnparsed::userObject, XmlBlasterAccessUnparsed::writenMutex, XMLBLASTER_LOG_DUMP, xmlBlasterConnect(), xmlBlasterDefaultLogging(), xmlBlasterDisconnect(), xmlBlasterErase(), xmlBlasterGet(), xmlBlasterPing(), xmlBlasterPublish(), xmlBlasterPublishArr(), xmlBlasterPublishOneway(), xmlBlasterSubscribe(), and xmlBlasterUnSubscribe().

Here is the call graph for this function:

static int initialize ( XmlBlasterAccessUnparsed xa,
UpdateFp  update,
XmlBlasterException exception 
) [static]

Definition at line 257 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::argc, XmlBlasterAccessUnparsed::argv, XmlBlasterAccessUnparsed::callbackP, XmlBlasterAccessUnparsed::callbackThreadId, checkArgs(), XmlBlasterAccessUnparsed::clientsUpdateFp, XmlBlasterAccessUnparsed::connectionP, ExceptionStruct::errorCode, freeCallbackServerUnparsed(), freeXmlBlasterConnectionUnparsed(), getCallbackServerUnparsed(), PropertiesStruct::getString, getXmlBlasterConnectionUnparsed(), CallbackServerUnparsedStruct::hostCB, XmlBlasterConnectionUnparsedStruct::initConnection, interceptUpdate(), XmlBlasterAccessUnparsed::isInitialized, CallbackServerUnparsedStruct::log, XmlBlasterConnectionUnparsedStruct::log, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, CallbackServerUnparsedStruct::logUserP, XmlBlasterConnectionUnparsedStruct::logUserP, XmlBlasterAccessUnparsed::logUserP, ExceptionStruct::message, CallbackServerUnparsedStruct::portCB, postSendEvent(), XmlBlasterConnectionUnparsedStruct::postSendEvent, XmlBlasterConnectionUnparsedStruct::postSendEvent_userP, preSendEvent(), XmlBlasterConnectionUnparsedStruct::preSendEvent, XmlBlasterConnectionUnparsedStruct::preSendEvent_userP, XmlBlasterAccessUnparsed::props, CallbackServerUnparsedStruct::readFromSocket, XmlBlasterConnectionUnparsedStruct::readFromSocket, XmlBlasterReadFromSocketFuncHolder::readFromSocketFuncP, readnCompressed(), readnPlain(), CallbackServerUnparsedStruct::runCallbackServer, SNPRINTF, XmlBlasterConnectionUnparsedStruct::socketToXmlBlaster, XmlBlasterConnectionUnparsedStruct::socketToXmlBlasterUdp, strncpy0(), XmlBlasterReadFromSocketFuncHolder::userP, XmlBlasterWriteToSocketFuncHolder::userP, CallbackServerUnparsedStruct::useThisSocket, writenCompressed(), writenPlain(), CallbackServerUnparsedStruct::writeToSocket, XmlBlasterConnectionUnparsedStruct::writeToSocket, XmlBlasterWriteToSocketFuncHolder::writeToSocketFuncP, XMLBLASTER_LOG_INFO, XMLBLASTER_LOG_TRACE, XMLBLASTEREXCEPTION_ERRORCODE_LEN, and XMLBLASTEREXCEPTION_MESSAGE_LEN.

Referenced by getXmlBlasterAccessUnparsed(), and xmlBlasterConnect().

Here is the call graph for this function:

static void interceptUpdate ( MsgUnitArr msgUnitArrP,
void *  userData,
XmlBlasterException exception,
void *  socketDataHolder 
) [static]

Here we receive the callback messages from xmlBlaster, create a thread and dispatch it to the clients update.

See also:
UpdateFp in CallbackServerUnparsed.h

Definition at line 903 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::callbackMultiThreaded, XmlBlasterAccessUnparsed::clientsUpdateFp, ExceptionStruct::errorCode, UpdateContainer::exception, get_pthread_id(), MsgUnit::key, MsgUnitStructArr::len, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, XmlBlasterAccessUnparsed::lowLevelAutoAck, ExceptionStruct::message, MsgUnitStructArr::msgUnitArr, UpdateContainer::msgUnitArrP, MsgUnit::responseQos, runUpdate(), CallbackServerUnparsedStruct::sendResponseOrException, SNPRINTF, UpdateContainer::socketDataHolder, strcpyAlloc(), strncpy0(), XmlBlasterAccessUnparsed::threadCounter, CallbackServerUnparsedStruct::updateCbUserData, UpdateContainer::userData, UpdateContainer::xa, XMLBLASTER_LOG_ERROR, XMLBLASTER_LOG_INFO, XMLBLASTER_LOG_TRACE, XMLBLASTEREXCEPTION_ERRORCODE_LEN, and XMLBLASTEREXCEPTION_MESSAGE_LEN.

Referenced by initialize(), xmlBlasterUnmanagedCEConnect(), xmlBlasterUnmanagedCEInitialize(), xmlBlasterUnmanagedConnect(), and xmlBlasterUnmanagedInitialize().

Here is the call graph for this function:

static int isConnected ( XmlBlasterAccessUnparsed xa  )  [static]

Definition at line 378 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::connectionP, XmlBlasterConnectionUnparsedStruct::isConnected, and XmlBlasterAccessUnparsed::isShutdown.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

static int mutexUnlock ( MsgRequestInfo msgRequestInfoP,
XmlBlasterException exception 
) [static]

Free lock.

Parameters:
msgRequestInfoP Transporting data
exception The exception struct, can be null
Returns:
false on error, the exception struct is filled in this case and the lock is not released

Definition at line 565 of file XmlBlasterAccessUnparsed.c.

References ExceptionStruct::errorCode, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, ExceptionStruct::message, MsgRequestInfoStruct::methodName, MsgRequestInfoStruct::requestIdStr, MsgRequestInfoStruct::responseMutex, MsgRequestInfoStruct::responseMutexIsLocked, SNPRINTF, strncpy0(), MsgRequestInfoStruct::xa, XMLBLASTER_LOG_ERROR, XMLBLASTER_LOG_TRACE, XMLBLASTEREXCEPTION_ERRORCODE_LEN, and XMLBLASTEREXCEPTION_MESSAGE_LEN.

Referenced by postSendEvent().

Here is the call graph for this function:

static MsgRequestInfo * postSendEvent ( MsgRequestInfo msgRequestInfoP,
XmlBlasterException exception 
) [static]

Callback function (wait for response) called directly after a message is sent.

Parameters:
msgRequestInfoP Contains some informations about the request, may not be NULL
exception May not be NULL
Returns:
The returned string from a request is written into msgRequestInfoP->data, the caller needs to free() it.

Definition at line 480 of file XmlBlasterAccessUnparsed.c.

References MsgRequestInfoStruct::blob, XmlBlasterAccessUnparsed::callbackP, convertToXmlBlasterException(), BlobHolder::data, BlobHolder::dataLen, ExceptionStruct::errorCode, freeBlobHolderContent(), getAbsoluteTime(), XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, ExceptionStruct::message, MsgRequestInfoStruct::methodName, MSG_TYPE_EXCEPTION, mutexUnlock(), CallbackServerUnparsedStruct::removeResponseListener, MsgRequestInfoStruct::requestIdStr, MsgRequestInfoStruct::responseBlob, MsgRequestInfoStruct::responseCond, MsgRequestInfoStruct::responseMutex, XmlBlasterAccessUnparsed::responseTimeout, MsgRequestInfoStruct::responseType, MsgRequestInfoStruct::rollback, SNPRINTF, strncpy0(), MsgRequestInfoStruct::xa, XMLBLASTER_LOG_ERROR, XMLBLASTER_LOG_TRACE, XMLBLASTEREXCEPTION_ERRORCODE_LEN, and XMLBLASTEREXCEPTION_MESSAGE_LEN.

Referenced by initialize().

Here is the call graph for this function:

static MsgRequestInfo * preSendEvent ( MsgRequestInfo msgRequestInfoP,
XmlBlasterException exception 
) [static]

Callback from XmlBlasterConnectionUnparsed just before a message is sent, the msgRequestInfo contains the requestId used.

This is the clients calling thread.

Parameters:
msgRequestInfoP Contains some informations about the request, may not be NULL
exception May not be NULL
Returns:
The same (or a manipulated/encrypted) msgRequestInfo, if NULL the exception is filled. If msgRequestInfoP->blob.data was changed and malloc()'d by you, the caller will free() it. If you return NULL you need to call removeResponseListener() to avoid a memory leak.

Definition at line 396 of file XmlBlasterAccessUnparsed.c.

References CallbackServerUnparsedStruct::addResponseListener, XmlBlasterAccessUnparsed::callbackP, BlobHolder::dataLen, ExceptionStruct::errorCode, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, ExceptionStruct::message, MsgRequestInfoStruct::methodName, MSG_TYPE_INVOKE, MsgRequestInfoStruct::requestIdStr, MsgRequestInfoStruct::responseBlob, responseEvent(), MsgRequestInfoStruct::responseMutex, MsgRequestInfoStruct::responseMutexIsLocked, SNPRINTF, strncpy0(), MsgRequestInfoStruct::xa, xbl_isOneway(), XMLBLASTER_LOG_TRACE, XMLBLASTEREXCEPTION_ERRORCODE_LEN, and XMLBLASTEREXCEPTION_MESSAGE_LEN.

Referenced by initialize().

Here is the call graph for this function:

static ssize_t readnCompressed ( void *  userP,
int  fd,
char *  ptr,
size_t  nbytes,
XmlBlasterNumReadFunc  fpNumRead,
void *  userP2 
) [static]

Read data from socket, uncompress it if necessary.

Definition at line 1083 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::connectionP, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, XmlBlasterAccessUnparsed::readnMutex, XMLBLASTER_LOG_ERROR, XMLBLASTER_LOG_TRACE, xmlBlaster_readnCompressed(), and XmlBlasterConnectionUnparsedStruct::zlibReadBuf.

Referenced by initConnection(), and initialize().

Here is the call graph for this function:

static ssize_t readnPlain ( void *  userP,
int  fd,
char *  ptr,
size_t  nbytes,
XmlBlasterNumReadFunc  fpNumRead,
void *  userP2 
) [static]

Read uncompressed to socket (thread safe).

Definition at line 1063 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, readn(), XmlBlasterAccessUnparsed::readnMutex, and XMLBLASTER_LOG_ERROR.

Here is the call graph for this function:

static void responseEvent ( MsgRequestInfo msgRequestInfoP,
void *  socketDataHolder 
) [static]

This function is called by the callback server when a response message arrived (after we send a request).

The xa->responseBlob->data is malloc()'d with the response string, you need to free it. This method is executed by the callback server thread.

Parameters:
msgRequestInfoP May not be NULL
socketDataHolder is on the stack and does not need to be freed, the 'data' member is malloc()'d and must be freed by the caller.

Definition at line 443 of file XmlBlasterAccessUnparsed.c.

References SocketDataHolder::blob, blobcpyAlloc(), BlobHolder::data, BlobHolder::dataLen, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, SocketDataHolder::requestId, MsgRequestInfoStruct::responseBlob, MsgRequestInfoStruct::responseCond, MsgRequestInfoStruct::responseMutex, MsgRequestInfoStruct::responseType, SocketDataHolder::type, MsgRequestInfoStruct::xa, XMLBLASTER_LOG_ERROR, and XMLBLASTER_LOG_TRACE.

Referenced by preSendEvent().

Here is the call graph for this function:

static int runUpdate ( UpdateContainer container  )  [static]

Run by the new created thread, calls the clients update method.

Leaving this pthread start routine does an implicit pthread_exit().

Parameters:
container Holding all necessary informations, we free it when we are done
Returns:
0 on success, 1 on error. The return value is the exit value returned by pthread_join()

Definition at line 870 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::clientsUpdateFp, UpdateContainer::exception, get_pthread_id(), XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, XmlBlasterAccessUnparsed::lowLevelAutoAck, UpdateContainer::msgUnitArrP, CallbackServerUnparsedStruct::sendResponseOrException, UpdateContainer::socketDataHolder, XmlBlasterAccessUnparsed::threadCounter, UpdateContainer::userData, UpdateContainer::xa, and XMLBLASTER_LOG_TRACE.

Referenced by interceptUpdate().

Here is the call graph for this function:

static ssize_t writenCompressed ( void *  xa,
int  fd,
char *  ptr,
size_t  nbytes 
) [static]

Compress data and send to socket.

Definition at line 1039 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::connectionP, XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, XmlBlasterAccessUnparsed::writenMutex, XMLBLASTER_LOG_ERROR, XMLBLASTER_LOG_TRACE, xmlBlaster_writenCompressed(), and XmlBlasterConnectionUnparsedStruct::zlibWriteBuf.

Referenced by initConnection(), and initialize().

Here is the call graph for this function:

static ssize_t writenPlain ( void *  xa,
int  fd,
char *  ptr,
size_t  nbytes 
) [static]

Write uncompressed to socket (thread safe).

Definition at line 1013 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, writen(), XmlBlasterAccessUnparsed::writenMutex, and XMLBLASTER_LOG_ERROR.

Here is the call graph for this function:

char* xmlBlasterAccessUnparsedUsage ( char *  usage  ) 

Help usage.

Parameters:
usage Please pass a string with at least XMLBLASTER_MAX_USAGE_LEN chars allocated (or on stack)
Returns:
Your usage pointer filled with informations

Definition at line 605 of file XmlBlasterAccessUnparsed.c.

References callbackServerRawUsage(), SNPRINTF, XMLBLASTER_MAX_USAGE_LEN, and xmlBlasterConnectionUnparsedUsage().

Referenced by main(), xmlBlasterUnmanagedCEUsage(), and xmlBlasterUnmanagedUsage().

Here is the call graph for this function:

static char * xmlBlasterConnect ( XmlBlasterAccessUnparsed xa,
char *  qos,
UpdateFp  update,
XmlBlasterException exception 
) [static]

Definition at line 619 of file XmlBlasterAccessUnparsed.c.

References XmlBlasterAccessUnparsed::callbackP, checkArgs(), XmlBlasterConnectionUnparsedStruct::connect, XmlBlasterAccessUnparsed::connectionP, ExceptionStruct::errorCode, CallbackServerUnparsedStruct::hostCB, initialize(), XmlBlasterAccessUnparsed::log, XmlBlasterAccessUnparsed::logLevel, XmlBlasterAccessUnparsed::logUserP, ExceptionStruct::message, CallbackServerUnparsedStruct::portCB, XmlBlasterConnectionUnparsedStruct::secretSessionId, SNPRINTF, snprintf0(), strcpyAlloc(), strncat0(), strncpy0(), XMLBLASTER_LOG_TRACE, XMLBLASTEREXCEPTION_ERRORCODE_LEN, and XMLBLASTEREXCEPTION_MESSAGE_LEN.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static int xmlBlasterDisconnect ( XmlBlasterAccessUnparsed xa,
char *  qos,
XmlBlasterException exception 
) [static]

Definition at line 697 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::disconnect.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static QosArr * xmlBlasterErase ( XmlBlasterAccessUnparsed xa,
char *  key,
char *  qos,
XmlBlasterException exception 
) [static]

Erase a message from the server.

Returns:
A struct holding the raw QoS XML strings returned from xmlBlaster, only NULL if an exception is thrown. You need to freeQosArr() it
See also:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.erase.html

http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.socket.html

Definition at line 781 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::erase.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static MsgUnitArr * xmlBlasterGet ( XmlBlasterAccessUnparsed xa,
char *  key,
char *  qos,
XmlBlasterException exception 
) [static]

Get a message.

See also:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.get.html

http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.socket.html

Returns:
NULL on error, please check exception in such a case

Definition at line 812 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::get.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static char * xmlBlasterPing ( XmlBlasterAccessUnparsed xa,
char *  qos,
XmlBlasterException exception 
) [static]

Ping the server.

Parameters:
xa The 'this' pointer
qos The QoS or 0
exception *errorCode!=0 on failure
Returns:
The ping return QoS raw xml string, you need to free() it or 0 on failure (in which case *exception.errorCode!=0)
See also:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.socket.html

Definition at line 798 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::ping.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static char * xmlBlasterPublish ( XmlBlasterAccessUnparsed xa,
MsgUnit msgUnit,
XmlBlasterException exception 
) [static]

Publish a message to the server.

See also:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.publish.html

http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.socket.html

XmlBlasterConnectionUnparsed::publish() for a function documentation

Definition at line 711 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::publish.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static QosArr * xmlBlasterPublishArr ( XmlBlasterAccessUnparsed xa,
MsgUnitArr msgUnitArr,
XmlBlasterException exception 
) [static]

Publish a message array in a bulk to the server.

See also:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.publish.html

http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.socket.html

XmlBlasterConnectionUnparsed::publishArr() for a function documentation

Definition at line 725 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::publishArr.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static void xmlBlasterPublishOneway ( XmlBlasterAccessUnparsed xa,
MsgUnitArr msgUnitArr,
XmlBlasterException exception 
) [static]

Publish a message array in a bulk to the server, we don't receive an ACK.

See also:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.publish.html

http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.socket.html

XmlBlasterConnectionUnparsed::publishOneway() for a function documentation

Definition at line 739 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::publishOneway.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static char * xmlBlasterSubscribe ( XmlBlasterAccessUnparsed xa,
char *  key,
char *  qos,
XmlBlasterException exception 
) [static]

Subscribe a message.

See also:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.subscribe.html

http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.socket.html

Definition at line 750 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::subscribe.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function:

static QosArr * xmlBlasterUnSubscribe ( XmlBlasterAccessUnparsed xa,
char *  key,
char *  qos,
XmlBlasterException exception 
) [static]

UnSubscribe a message from the server.

Returns:
The raw QoS XML strings returned from xmlBlaster, only NULL if an exception is thrown You need to free it with freeQosArr() after usage
See also:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.unSubscribe.html

http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.socket.html

Definition at line 765 of file XmlBlasterAccessUnparsed.c.

References checkArgs(), XmlBlasterAccessUnparsed::connectionP, and XmlBlasterConnectionUnparsedStruct::unSubscribe.

Referenced by getXmlBlasterAccessUnparsed(), and getXmlBlasterConnectionUnparsed().

Here is the call graph for this function: