Lines Matching refs:value

185 static int date_from_ISO8601 (const char *text, time_t * value) {  in date_from_ISO8601()  argument
262 *value = mkgmtime(&tm); in date_from_ISO8601()
268 static int date_to_ISO8601 (time_t value, char *buf, int length) { in date_to_ISO8601() argument
270 tm = php_gmtime_r(&value, &tmbuf); in date_to_ISO8601()
892 const char *XMLRPC_SetValueID_Case(XMLRPC_VALUE value, const char* id, int len, XMLRPC_CASE id_case… in XMLRPC_SetValueID_Case() argument
894 if(value) { in XMLRPC_SetValueID_Case()
896 simplestring_clear(&value->id); in XMLRPC_SetValueID_Case()
897 (len > 0) ? simplestring_addn(&value->id, id, len) : in XMLRPC_SetValueID_Case()
898 simplestring_add(&value->id, id); in XMLRPC_SetValueID_Case()
903 for(i = 0; i < value->id.len; i++) { in XMLRPC_SetValueID_Case()
904 value->id.str[i] = in XMLRPC_SetValueID_Case()
906 xmlrpc_case_lower) ? tolower (value->id. in XMLRPC_SetValueID_Case()
907 str[i]) : toupper (value-> in XMLRPC_SetValueID_Case()
913 pRetval = value->id.str; in XMLRPC_SetValueID_Case()
946 const char *XMLRPC_SetValueString(XMLRPC_VALUE value, const char* val, int len) { in XMLRPC_SetValueString() argument
948 if(value && val) { in XMLRPC_SetValueString()
949 simplestring_clear(&value->str); in XMLRPC_SetValueString()
950 (len > 0) ? simplestring_addn(&value->str, val, len) : in XMLRPC_SetValueString()
951 simplestring_add(&value->str, val); in XMLRPC_SetValueString()
952 value->type = xmlrpc_string; in XMLRPC_SetValueString()
953 pRetval = (char *)value->str.str; in XMLRPC_SetValueString()
978 void XMLRPC_SetValueInt(XMLRPC_VALUE value, int val) { in XMLRPC_SetValueInt() argument
979 if(value) { in XMLRPC_SetValueInt()
980 value->type = xmlrpc_int; in XMLRPC_SetValueInt()
981 value->i = val; in XMLRPC_SetValueInt()
1004 void XMLRPC_SetValueBoolean(XMLRPC_VALUE value, int val) { in XMLRPC_SetValueBoolean() argument
1005 if(value) { in XMLRPC_SetValueBoolean()
1006 value->type = xmlrpc_boolean; in XMLRPC_SetValueBoolean()
1007 value->i = val ? 1 : 0; in XMLRPC_SetValueBoolean()
1036 int XMLRPC_SetIsVector(XMLRPC_VALUE value, XMLRPC_VECTOR_TYPE type) { in XMLRPC_SetIsVector() argument
1039 if (value) { in XMLRPC_SetIsVector()
1041 if(value->type == xmlrpc_vector) { in XMLRPC_SetIsVector()
1042 if(value->v) { in XMLRPC_SetIsVector()
1043 if(!Q_Size(value->v->q)) { in XMLRPC_SetIsVector()
1044 value->v->type = type; in XMLRPC_SetIsVector()
1049 value->v = calloc(1, sizeof(STRUCT_XMLRPC_VECTOR)); in XMLRPC_SetIsVector()
1050 if(value->v) { in XMLRPC_SetIsVector()
1051 value->v->q = (queue*)malloc(sizeof(queue)); in XMLRPC_SetIsVector()
1052 if(value->v->q) { in XMLRPC_SetIsVector()
1053 Q_Init(value->v->q); in XMLRPC_SetIsVector()
1054 value->v->type = type; in XMLRPC_SetIsVector()
1055 value->type = xmlrpc_vector; in XMLRPC_SetIsVector()
1292 int XMLRPC_VectorRemoveValue(XMLRPC_VALUE vector, XMLRPC_VALUE value) { in XMLRPC_VectorRemoveValue() argument
1293 if(vector && vector->v && vector->v->q && value) { in XMLRPC_VectorRemoveValue()
1298 if(xIter == value) { in XMLRPC_VectorRemoveValue()
1331 XMLRPC_VALUE value = NULL; in XMLRPC_CreateValueString() local
1333 value = XMLRPC_CreateValueEmpty(); in XMLRPC_CreateValueString()
1334 if(value) { in XMLRPC_CreateValueString()
1335 XMLRPC_SetValueString(value, val, len); in XMLRPC_CreateValueString()
1337 XMLRPC_SetValueID(value, id, 0); in XMLRPC_CreateValueString()
1341 return value; in XMLRPC_CreateValueString()
1437 void XMLRPC_CleanupValue(XMLRPC_VALUE value) { in XMLRPC_CleanupValue() argument
1438 if(value) { in XMLRPC_CleanupValue()
1439 if(value->iRefCount > 0) { in XMLRPC_CleanupValue()
1440 value->iRefCount --; in XMLRPC_CleanupValue()
1444 if(value->id.str) { in XMLRPC_CleanupValue()
1445 printf ("decremented refcount of %s, now %i\n", value->id.str, in XMLRPC_CleanupValue()
1446 value->iRefCount); in XMLRPC_CleanupValue()
1449 printf ("decremented refcount of 0x%x, now %i\n", value, in XMLRPC_CleanupValue()
1450 value->iRefCount); in XMLRPC_CleanupValue()
1454 if(value->type == xmlrpc_vector) { in XMLRPC_CleanupValue()
1455 if(value->v) { in XMLRPC_CleanupValue()
1456 if(value->iRefCount == 0) { in XMLRPC_CleanupValue()
1457 XMLRPC_VALUE cur = (XMLRPC_VALUE)Q_Head(value->v->q); in XMLRPC_CleanupValue()
1464 if(value->v && value->v->q) { in XMLRPC_CleanupValue()
1465 cur = Q_Next(value->v->q); in XMLRPC_CleanupValue()
1472 Q_Destroy(value->v->q); in XMLRPC_CleanupValue()
1473 my_free(value->v->q); in XMLRPC_CleanupValue()
1474 my_free(value->v); in XMLRPC_CleanupValue()
1480 if(value->iRefCount == 0) { in XMLRPC_CleanupValue()
1483 switch(value->type) { in XMLRPC_CleanupValue()
1493 if(value->id.str) { in XMLRPC_CleanupValue()
1494 printf("free'd %s\n", value->id.str); in XMLRPC_CleanupValue()
1497 printf("free'd 0x%x\n", value); in XMLRPC_CleanupValue()
1500 simplestring_free(&value->id); in XMLRPC_CleanupValue()
1501 simplestring_free(&value->str); in XMLRPC_CleanupValue()
1503 memset(value, 0, sizeof(STRUCT_XMLRPC_VALUE)); in XMLRPC_CleanupValue()
1504 my_free(value); in XMLRPC_CleanupValue()
1537 void XMLRPC_SetValueDateTime(XMLRPC_VALUE value, time_t time) { in XMLRPC_SetValueDateTime() argument
1538 if(value) { in XMLRPC_SetValueDateTime()
1540 value->type = xmlrpc_datetime; in XMLRPC_SetValueDateTime()
1541 value->i = time; in XMLRPC_SetValueDateTime()
1548 XMLRPC_SetValueDateTime_ISO8601 (value, timeBuf); in XMLRPC_SetValueDateTime()
1576 XMLRPC_VALUE XMLRPC_CopyValue(XMLRPC_VALUE value) { in XMLRPC_CopyValue() argument
1577 if(value) { in XMLRPC_CopyValue()
1578 value->iRefCount ++; in XMLRPC_CopyValue()
1580 if(value->id.str) { in XMLRPC_CopyValue()
1581 printf ("incremented refcount of %s, now %i\n", value->id.str, in XMLRPC_CopyValue()
1582 value->iRefCount); in XMLRPC_CopyValue()
1585 printf ("incremented refcount of 0x%x, now %i\n", value, in XMLRPC_CopyValue()
1586 value->iRefCount); in XMLRPC_CopyValue()
1590 return value; in XMLRPC_CopyValue()
1720 void XMLRPC_SetValueDateTime_ISO8601(XMLRPC_VALUE value, const char* s) { in XMLRPC_SetValueDateTime_ISO8601() argument
1721 if(value) { in XMLRPC_SetValueDateTime_ISO8601()
1724 value->type = xmlrpc_datetime; in XMLRPC_SetValueDateTime_ISO8601()
1726 value->i = time_val; in XMLRPC_SetValueDateTime_ISO8601()
1727 simplestring_clear(&value->str); in XMLRPC_SetValueDateTime_ISO8601()
1728 simplestring_add(&value->str, s); in XMLRPC_SetValueDateTime_ISO8601()
1792 void XMLRPC_SetValueBase64(XMLRPC_VALUE value, const char* s, int len) { in XMLRPC_SetValueBase64() argument
1793 if(value && s) { in XMLRPC_SetValueBase64()
1794 simplestring_clear(&value->str); in XMLRPC_SetValueBase64()
1795 (len > 0) ? simplestring_addn(&value->str, s, len) : in XMLRPC_SetValueBase64()
1796 simplestring_add(&value->str, s); in XMLRPC_SetValueBase64()
1797 value->type = xmlrpc_base64; in XMLRPC_SetValueBase64()
1856 void XMLRPC_SetValueDouble(XMLRPC_VALUE value, double val) { in XMLRPC_SetValueDouble() argument
1857 if(value) { in XMLRPC_SetValueDouble()
1858 value->type = xmlrpc_double; in XMLRPC_SetValueDouble()
1859 value->d = val; in XMLRPC_SetValueDouble()
1913 const char* XMLRPC_GetValueString(XMLRPC_VALUE value) { in XMLRPC_GetValueString() argument
1914 return ((value && value->type == xmlrpc_string) ? value->str.str : 0); in XMLRPC_GetValueString()
1936 int XMLRPC_GetValueStringLen(XMLRPC_VALUE value) { in XMLRPC_GetValueStringLen() argument
1937 return ((value) ? value->str.len : 0); in XMLRPC_GetValueStringLen()
1960 int XMLRPC_GetValueInt(XMLRPC_VALUE value) { in XMLRPC_GetValueInt() argument
1961 return ((value && value->type == xmlrpc_int) ? value->i : 0); in XMLRPC_GetValueInt()
1984 int XMLRPC_GetValueBoolean(XMLRPC_VALUE value) { in XMLRPC_GetValueBoolean() argument
1985 return ((value && value->type == xmlrpc_boolean) ? value->i : 0); in XMLRPC_GetValueBoolean()
2008 double XMLRPC_GetValueDouble(XMLRPC_VALUE value) { in XMLRPC_GetValueDouble() argument
2009 return ((value && value->type == xmlrpc_double) ? value->d : 0); in XMLRPC_GetValueDouble()
2033 const char* XMLRPC_GetValueBase64(XMLRPC_VALUE value) { in XMLRPC_GetValueBase64() argument
2034 return ((value && value->type == xmlrpc_base64) ? value->str.str : 0); in XMLRPC_GetValueBase64()
2058 time_t XMLRPC_GetValueDateTime(XMLRPC_VALUE value) { in XMLRPC_GetValueDateTime() argument
2059 return (time_t)((value && value->type == xmlrpc_datetime) ? value->i : 0); in XMLRPC_GetValueDateTime()
2081 const char* XMLRPC_GetValueDateTime_ISO8601(XMLRPC_VALUE value) { in XMLRPC_GetValueDateTime_ISO8601() argument
2082 return ((value && value->type == xmlrpc_datetime) ? value->str.str : 0); in XMLRPC_GetValueDateTime_ISO8601()
2105 const char* XMLRPC_GetValueID(XMLRPC_VALUE value) { in XMLRPC_GetValueID() argument
2106 return (const char*)((value && value->id.len) ? value->id.str : 0); in XMLRPC_GetValueID()
2130 int XMLRPC_VectorSize(XMLRPC_VALUE value) { in XMLRPC_VectorSize() argument
2132 if(value && value->type == xmlrpc_vector && value->v) { in XMLRPC_VectorSize()
2133 size = Q_Size(value->v->q); in XMLRPC_VectorSize()
2158 XMLRPC_VALUE XMLRPC_VectorRewind(XMLRPC_VALUE value) { in XMLRPC_VectorRewind() argument
2160 if(value && value->type == xmlrpc_vector && value->v) { in XMLRPC_VectorRewind()
2161 xReturn = (XMLRPC_VALUE)Q_Head(value->v->q); in XMLRPC_VectorRewind()
2184 XMLRPC_VALUE XMLRPC_VectorNext(XMLRPC_VALUE value) { in XMLRPC_VectorNext() argument
2186 if(value && value->type == xmlrpc_vector && value->v) { in XMLRPC_VectorNext()
2187 xReturn = (XMLRPC_VALUE)Q_Next(value->v->q); in XMLRPC_VectorNext()
2215 XMLRPC_VALUE_TYPE XMLRPC_GetValueType(XMLRPC_VALUE value) { in XMLRPC_GetValueType() argument
2216 return value ? value->type : xmlrpc_empty; in XMLRPC_GetValueType()
2243 XMLRPC_VECTOR_TYPE XMLRPC_GetVectorType(XMLRPC_VALUE value) { in XMLRPC_GetVectorType() argument
2244 return(value && value->v) ? value->v->type : xmlrpc_none; in XMLRPC_GetVectorType()
2269 XMLRPC_VALUE_TYPE_EASY XMLRPC_GetValueTypeEasy (XMLRPC_VALUE value) { in XMLRPC_GetValueTypeEasy() argument
2270 if (value) { in XMLRPC_GetValueTypeEasy()
2271 switch (value->type) { in XMLRPC_GetValueTypeEasy()
2273 switch (value->v->type) { in XMLRPC_GetValueTypeEasy()
2285 return(XMLRPC_VALUE_TYPE_EASY) value->type; in XMLRPC_GetValueTypeEasy()
2834 int XMLRPC_ValueIsFault (XMLRPC_VALUE value) { in XMLRPC_ValueIsFault() argument
2835 if( XMLRPC_VectorGetValueWithID(value, "faultCode") && in XMLRPC_ValueIsFault()
2836 XMLRPC_VectorGetValueWithID(value, "faultString") ) { in XMLRPC_ValueIsFault()
2882 int XMLRPC_GetValueFaultCode (XMLRPC_VALUE value) { in XMLRPC_GetValueFaultCode() argument
2883 return XMLRPC_VectorGetIntWithID(value, "faultCode"); in XMLRPC_GetValueFaultCode()
2927 const char* XMLRPC_GetValueFaultString (XMLRPC_VALUE value) { in XMLRPC_GetValueFaultString() argument
2928 return XMLRPC_VectorGetStringWithID(value, "faultString"); in XMLRPC_GetValueFaultString()