Files
sics/sicsobj.h
koennecke 31a48d2155 - First implementation of Hdbqueue
- First implementation of new object model for SICS
2007-08-03 15:12:10 +00:00

45 lines
1.6 KiB
C

/**
* This is the header file for the new (as of 2007) style SICS objects
*
* copyright: see file COPYRIGHT
*
* Mark Koennecke, July 2007
*/
#ifndef SICSOBJ2_H_
#define SICSOBJ2_H_
#include <stdio.h>
#include <hipadaba.h>
/*======================================================================
* Be careful when changing this data structure. It has to be compatible
* in its first fields with the SICS object descriptor as defined in
* obdes.h in order to achieve backwards compatibility with old style
* SICS objects.
* =====================================================================*/
typedef struct {
pObjectDescriptor pDes;
pHdb objectNode;
void *pPrivate;
void (*KillPrivate)(void *pPrivate);
}SICSOBJ, *pSICSOBJ;
/*-----------------------------------------------------------------------*/
typedef int (*SICSOBJFunc)(pSICSOBJ self, SConnection *pCon,
pHdb par[], int nPar);
/*======================= Live & Death =================================*/
pSICSOBJ MakeSICSOBJ(char *name, char *class);
void KillSICSOBJ(void *data);
/**
* This creates a new SICS object and installs it in the interpreter. It returns
* the newly created SICS object such that the caller can continue
* configuring it.
*/
pSICSOBJ SetupSICSOBJ(SConnection *pCon,SicsInterp *pSics, void *pData,
int argc, char *argv[]);
/*====================== Interpreter Interface ===========================*/
int InvokeSICSOBJ(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]);
int InstallSICSOBJ(SConnection *pCon, SicsInterp *pSics, void *pData,
int argc, char *argv[]);
#endif /*SICSOBJ2_H_*/