- SCStore store now also context and macro state
This commit is contained in:
25
conman.h
25
conman.h
@ -169,16 +169,25 @@ typedef int (*writeFunc)(struct __SConnection *pCon,
|
|||||||
int ConSicsAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
int ConSicsAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||||
int argc, char *argv[]);
|
int argc, char *argv[]);
|
||||||
/******************************** Store ************************************/
|
/******************************** Store ************************************/
|
||||||
typedef struct {
|
typedef struct SCStore *SCStore;
|
||||||
SConnection *pCon;
|
|
||||||
long ident;
|
|
||||||
} SCStore;
|
|
||||||
|
|
||||||
void SCSave(SCStore *con, SConnection *pCon);
|
SCStore SCSave(SConnection *pCon, SCStore oldStore);
|
||||||
/* save a connection for later use. */
|
/* save a connection and its context for later use. */
|
||||||
|
|
||||||
SConnection *SCLoad(SCStore *con);
|
SConnection *SCLoad(SCStore conStore);
|
||||||
/* check con and return SConnection if still valid or NULL otherwise. */
|
/* 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);
|
void KillFreeConnections(void);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user