Main Page | Compound List | File List | Compound Members | File Members | Related Pages

# beepprofile.h

Go to the documentation of this file.

    00001
    00043 #ifndef __LIB3195_BEEPPROFILE_H_INCLUDED__
    00044 #define __LIB3195_BEEPPROFILE_H_INCLUDED__ 1
    00045 #define sbProfCHECKVALIDOBJECT(x) {assert(x != NULL); assert(x->OID == OIDsbProf);}
    00046
    00047 struct sbMesgObject;
    00048 struct sbNVTRObject;
    00049 struct srAPIObject;
    00050 struct srSLMGObject;
    00051
    00052 #if FEATURE_LISTENER == 1
    00053
    00054         enum sbProfEvent_
    00055         {
    00056                 sbPROFEVENT_ONMESGRECV,
    00057                 sbPROFEVENT_ONCHANCREAT,
    00058                 sbPROFEVENT_UNKNOWN = 0
    00059         };
    00060         typedef enum sbProfEvent_ sbProfEvent;
    00061
    00062 #endif
    00063
    00064 struct sbProfObject
    00068 {
    00069         srObjID OID;
    00070         char* pszProfileURI;
    00071 #if FEATURE_LISTENER == 1
    00072         int bDestroyOnChanClose;
    00073         struct srAPIObject *pAPI;
    00074         /* now come the event handlers */
    00078         srRetVal (*OnChanCreate)(struct sbProfObject *pThis, struct sbSessObject* pSess, struct sbChanObject* pChan);
    00082         srRetVal (*OnMesgRecv)(struct sbProfObject *pThis, int* pAbort, struct sbSessObject* pSess, struct sbChanObject* pChan, struct sbMesgObject *pMesg);
    00083 #endif
    00084         /* now come client-side event handlers (always present) */
    00086         srRetVal (*OnClntOpenLogChan)(struct sbChanObject *pChan);
    00088         srRetVal (*OnClntSendLogMsg)(struct sbChanObject* pChan, char* szLogmsg);
    00090         srRetVal (*OnClntSendSLMG)(struct sbChanObject* pChan, struct srSLMGObject *pSLMG);
    00092         srRetVal (*OnClntCloseLogChan)(struct sbChanObject* pChan);
    00093 };
    00094 typedef struct sbProfObject sbProfObj;
    00095
    00106 srRetVal sbProfConstruct(sbProfObj** ppThis, char *pszURI);
    00107
    00112 char* sbProfGetURI(sbProfObj* pThis);
    00113
    00117 void sbProfDestroy(sbProfObj* pThis);
    00118
    00128 srRetVal sbProfSetEventHandler(struct sbProfObject* pThis, sbProfEvent iEvent, srRetVal (*handler)());
    00129
    00134 srRetVal sbProfSetAPIObj(sbProfObj *pThis, srAPIObj *pAPI);
    00135
    00151 sbProfObj*  sbProfFindProfileMatch(struct sbNVTRObject *pProfListRemote, struct sbNVTRObject *pProfList2);
    00152
    00160 sbProfObj*  sbProfFindProfile(struct sbNVTRObject *pProfList, char* pszSearch);
    00161
    00171 srRetVal sbProfSetClntEventHandlers(sbProfObj *pProf,
    00172                                                                         srRetVal (*OnClntOpenLogChan)(struct sbChanObject *pChan),
    00173                                                                         srRetVal (*OnClntSendLogMsg)(struct sbChanObject* pChan, char* szLogmsg),
    00174                                                                         srRetVal (*OnClntSendSLMG)(struct sbChanObject* pChan, struct srSLMGObject *pSLMG),
    00175                                                                         srRetVal (*OnClntCloseLogChan)(struct sbChanObject* pChan));
    00176
    00195 sbProfObj*  sbProfFindProfileURIMatch(struct sbNVTRObject *pProfListLocal, struct sbNVTRObject *pURIListRemote);
    00196
    00197
    00198 #endif