PSI sics-cvs-psi-2006

This commit is contained in:
2006-05-08 02:00:00 +00:00
committed by Douglas Clowes
parent ae77364de2
commit 6e926b813f
388 changed files with 445529 additions and 14109 deletions

76
obdes.c
View File

@@ -66,6 +66,7 @@
return NULL;
}
pRes->name = strdup(name);
pRes->pKeys = NULL;
pRes->SaveStatus = DefaultSave;
pRes->GetInterface = DefaultGetInterface;
return pRes;
@@ -74,10 +75,8 @@
void DeleteDescriptor(pObjectDescriptor self)
{
assert(self);
if(self->name)
free(self->name);
if(self->name) free(self->name);
if(self->pKeys) IFDeleteOptions(self->pKeys);
free(self);
}
@@ -134,11 +133,64 @@
return 0;
}
/*------------------------------------------------------------------------*/
pObjectDescriptor FindDescriptor(void *pData)
{
pDummy pDum = NULL;
assert(pData);
pDum = (pDummy)pData;
return pDum->pDescriptor;
}
pObjectDescriptor FindDescriptor(void *pData)
{
pDummy pDum = NULL;
assert(pData);
pDum = (pDummy)pData;
return pDum->pDescriptor;
}
/*--------------------------------------------------------------------------*/
void SetDescriptorKey(pObjectDescriptor self, char *keyName, char *eltValue)
{
if(NULL!=self)
{
IFSetOption(self->pKeys,keyName,eltValue);
}
}
/*--------------------------------------------------------------------------*/
void SetDescriptorGroup(pObjectDescriptor self, char *group)
{
if(NULL==self)
{
return;
}
IFSetOption(self->pKeys,"group",group);
}
/*--------------------------------------------------------------------------*/
void SetDescriptorDescription(pObjectDescriptor self, char *description)
{
if(NULL==self)
{
return;
}
IFSetOption(self->pKeys,"description", description);
}
/*--------------------------------------------------------------------------*/
char * GetDescriptorKey(pObjectDescriptor self, char *keyName)
{
if(NULL==self)
{
return NULL;
}
return IFindOption(self->pKeys,keyName);
}
/*--------------------------------------------------------------------------*/
char * GetDescriptorGroup(pObjectDescriptor self)
{
if(NULL==self)
{
return NULL;
}
return IFindOption(self->pKeys,"group");
}
/*--------------------------------------------------------------------------*/
char *GetDescriptorDescription(pObjectDescriptor self)
{
if(NULL==self)
{
return NULL;
}
return IFindOption(self->pKeys,"description");
}