FACT++  1.0
void DimCommand::declareIt ( char *  name,
char *  format,
DimCommandHandler handler,
DimServerDns dns 
)
private

Definition at line 136 of file discpp.cxx.

References command_routine(), dis_add_cmnd, dis_add_cmnd_dns(), dis_init(), DimServerDns::getDnsId(), handler(), DimService::itsDns, DimService::itsId, DimService::itsName, and DimServer::start().

137 {
138 // itsTagId = 0;
139  itsId = 0;
140  itsDns = dns;
141  itsName = new char[(int)strlen(name)+1];
142  strcpy( itsName, name);
143  itsFormat = new char[(int)strlen(format)+1];
144  strcpy( itsFormat, format);
145  currCmnd = 0;
146  if(handler)
148  else
149  itsCommandHandler = 0;
150 // itsTagId = id_get((void *)this, SRC_DIS);
151  dis_init();
152  if(!itsDns)
153  {
154  DISABLE_AST
155  itsId = dis_add_cmnd( name, format, command_routine,
156 // itsTagId);
157  (dim_long)this);
158  ENABLE_AST
160  }
161  else
162  {
163  DISABLE_AST
164  itsId = dis_add_cmnd_dns( itsDns->getDnsId(), name, format, command_routine,
165 // itsTagId);
166  (dim_long)this);
167  ENABLE_AST
168 // itsDns->addServiceId(itsId);
170  }
171 }
char * itsFormat
Definition: dis.hxx:292
void dis_init()
Definition: dis.c:220
dim_long getDnsId()
Definition: discpp.cxx:403
#define dis_add_cmnd
Definition: dis.h:13
char * itsName
Definition: dis.hxx:289
long dim_long
Definition: dim_common.h:57
static void command_routine(void *tagp, void *buf, int *size)
Definition: discpp.cxx:108
DimCommandHandler * itsCommandHandler
Definition: dis.hxx:248
unsigned dis_add_cmnd_dns(dim_long dnsid, char *name, char *type, void(*user_routine)(), dim_long tag)
Definition: dis.c:510
DimServerDns * itsDns
Definition: dis.hxx:296
CmndInfo * currCmnd
Definition: dis.hxx:294
static void start()
Definition: discpp.cxx:512
static void handler(int conn_id, char *packet, int size, int status)
Definition: webServer.c:635
int itsId
Definition: dis.hxx:290

+ Here is the call graph for this function: