]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/c-apps/oils_utils.h
patching up some more logging stuff
[Evergreen.git] / Open-ILS / src / c-apps / oils_utils.h
1 #include "objson/object.h"
2 #include "openils/fieldmapper_lookup.h"
3
4 /**
5   Returns the string value for field 'field' in the given object.
6   This method calls jsonObjectToSimpleString so numbers will be
7   returned as strings.
8   @param object The object to inspect
9   @param field The field whose value is requsted
10   @return The string at the given position, if none exists, 
11   then NULL is returned.  The caller must free the returned string
12   */
13 char* oilsFMGetString( jsonObject* object, char* field );
14
15
16 /**
17   Returns the jsonObject found at the specified field in the
18   given object.
19   @param object The object to inspect
20   @param field The field whose value is requsted
21   @return The found object or NULL if none exists.  Do NOT free the 
22   returned object.
23   */
24 jsonObject* oilsFMGetObject( jsonObject* object, char* field );
25
26 /**
27   Sets the given field in the given object to the given string
28   @param object The object to update
29   @param field The field to change
30   @param string The new data
31   @return 0 if the field was updated successfully, -1 on error
32   */
33 int oilsFMSetString( jsonObject* object, char* field, char* string );