1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

psyc_entity_type(), _action methods

This commit is contained in:
tg(x) 2011-12-03 14:34:29 +01:00
parent 078ec2a374
commit 0fefc0be74
3 changed files with 34 additions and 0 deletions

View file

@ -78,7 +78,32 @@ typedef enum {
PSYC_ENTITY_SERVICE = '$',
} PsycEntityType;
/**
* Parse uniform.
*
* @return PsycScheme on success, PsycParseUniformRC on error.
*/
int
psyc_uniform_parse (PsycUniform *uni, const char *buffer, size_t length);
/**
* Get entity type.
*
* @return PsycEntityType on success, PSYC_ERROR on error.
*/
static inline int
psyc_entity_type (char entity)
{
switch (entity) {
case PSYC_ENTITY_PERSON:
return PSYC_ENTITY_PERSON;
case PSYC_ENTITY_PLACE:
return PSYC_ENTITY_PLACE;
case PSYC_ENTITY_SERVICE:
return PSYC_ENTITY_SERVICE;
default:
return PSYC_ERROR;
}
}
#endif