PSI sics-cvs-psi-2008-10-02
This commit is contained in:
37
conman.h
37
conman.h
@@ -24,6 +24,7 @@
|
||||
#include "network.h"
|
||||
#include "obdes.h"
|
||||
#include "commandcontext.h"
|
||||
#include "dynstring.h"
|
||||
|
||||
#define MAXLOGFILES 10
|
||||
|
||||
@@ -57,8 +58,13 @@ typedef int (*writeFunc)(struct __SConnection *pCon,
|
||||
int iUserRights;
|
||||
int inUse;
|
||||
int iGrab; /* grab flag for token*/
|
||||
int parameterChange;
|
||||
int sicsError;
|
||||
|
||||
/*
|
||||
* for I/O Buffering
|
||||
*/
|
||||
pDynString data;
|
||||
writeFunc oldWriteFunc;
|
||||
|
||||
/*
|
||||
stuff supporting the sycamore protocol and a
|
||||
@@ -116,6 +122,10 @@ typedef int (*writeFunc)(struct __SConnection *pCon,
|
||||
int SCNotWrite(SConnection *self, char *buffer, int iOut);
|
||||
int SCNormalWrite(SConnection *self, char *buffer, int iOut);
|
||||
int SCWriteWithOutcode(SConnection *self, char *buffer, int iOut);
|
||||
int SCACTWrite(SConnection *self, char *buffer, int iOut);
|
||||
/*********************** I/O Buffering ***********************************/
|
||||
int SCStartBuffering(SConnection *pCon);
|
||||
pDynString SCEndBuffering(SConnection *pCon);
|
||||
/************************* CallBack *********************************** */
|
||||
int SCRegister(SConnection *pCon, SicsInterp *pSics,
|
||||
void *pInter, long lID);
|
||||
@@ -158,16 +168,25 @@ typedef int (*writeFunc)(struct __SConnection *pCon,
|
||||
int ConSicsAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
int argc, char *argv[]);
|
||||
/******************************** Store ************************************/
|
||||
typedef struct {
|
||||
SConnection *pCon;
|
||||
long ident;
|
||||
} SCStore;
|
||||
typedef struct SCStore SCStore;
|
||||
|
||||
void SCSave(SCStore *con, SConnection *pCon);
|
||||
/* save a connection for later use. */
|
||||
SCStore *SCSave(SConnection *pCon, SCStore *oldStore);
|
||||
/* save a connection and its context for later use. */
|
||||
|
||||
SConnection *SCLoad(SCStore *con);
|
||||
/* check con and return SConnection if still valid or NULL otherwise. */
|
||||
SConnection *SCLoad(SCStore *conStore);
|
||||
/* check con and return SConnection if still valid or a dummy connection otherwise. */
|
||||
|
||||
SConnection *SCStorePush(SCStore *conStore);
|
||||
/* load connection and push stored context. Must be paired with an SCStorePop command */
|
||||
|
||||
void SCStorePop(SCStore *conStore);
|
||||
/* pop context */
|
||||
|
||||
int SCStoreConnected(SCStore *conStore);
|
||||
/* check if a stored connection is not closed */
|
||||
|
||||
void SCStoreFree(SCStore *conStore);
|
||||
/* free an SCStore */
|
||||
|
||||
void KillFreeConnections(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user