Back to index

php5  5.3.10
Classes | Defines | Typedefs | Functions | Variables
xmlrpc.c File Reference
#include "ext/xml/expat_compat.h"
#include "main/php_reentrancy.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <time.h>
#include <ctype.h>
#include "queue.h"
#include "xmlrpc.h"
#include "base64.h"
#include "xml_to_xmlrpc.h"
#include "xml_to_dandarpc.h"
#include "xml_to_soap.h"
#include "xml_element.h"
#include "xmlrpc_private.h"
#include "xmlrpc_introspection_private.h"
#include "system_methods_private.h"

Go to the source code of this file.

Classes

struct  _xmlrpc_options

Defines

#define XMLRPC_IS_NUMBER(x)   if (x < '0' || x > '9') return -1;

Typedefs

typedef struct _xmlrpc_options STRUCT_XMLRPC_OPTIONS
typedef struct _xmlrpc_optionsXMLRPC_OPTIONS

Functions

static time_t mkgmtime (struct tm *tm)
static int date_from_ISO8601 (const char *text, time_t *value)
static int date_to_ISO8601 (time_t value, char *buf, int length)
XMLRPC_REQUEST XMLRPC_RequestNew ()
void XMLRPC_RequestFree (XMLRPC_REQUEST request, int bFreeIO)
const char * XMLRPC_RequestSetMethodName (XMLRPC_REQUEST request, const char *methodName)
const char * XMLRPC_RequestGetMethodName (XMLRPC_REQUEST request)
XMLRPC_REQUEST_TYPE XMLRPC_RequestSetRequestType (XMLRPC_REQUEST request, XMLRPC_REQUEST_TYPE type)
XMLRPC_REQUEST_TYPE XMLRPC_RequestGetRequestType (XMLRPC_REQUEST request)
XMLRPC_VALUE XMLRPC_RequestSetData (XMLRPC_REQUEST request, XMLRPC_VALUE data)
XMLRPC_VALUE XMLRPC_RequestGetData (XMLRPC_REQUEST request)
XMLRPC_VALUE XMLRPC_RequestSetError (XMLRPC_REQUEST request, XMLRPC_VALUE error)
XMLRPC_VALUE XMLRPC_RequestGetError (XMLRPC_REQUEST request)
XMLRPC_REQUEST_OUTPUT_OPTIONS XMLRPC_RequestSetOutputOptions (XMLRPC_REQUEST request, XMLRPC_REQUEST_OUTPUT_OPTIONS output)
XMLRPC_REQUEST_OUTPUT_OPTIONS XMLRPC_RequestGetOutputOptions (XMLRPC_REQUEST request)
char * XMLRPC_VALUE_ToXML (XMLRPC_VALUE val, int *buf_len)
char * XMLRPC_REQUEST_ToXML (XMLRPC_REQUEST request, int *buf_len)
XMLRPC_VALUE XMLRPC_VALUE_FromXML (const char *in_buf, int len, XMLRPC_REQUEST_INPUT_OPTIONS in_options)
static XMLRPC_VALUE map_expat_errors (XML_ELEM_ERROR error)
XMLRPC_REQUEST XMLRPC_REQUEST_FromXML (const char *in_buf, int len, XMLRPC_REQUEST_INPUT_OPTIONS in_options)
XMLRPC_VALUE XMLRPC_CreateValueEmpty ()
const char * XMLRPC_SetValueID_Case (XMLRPC_VALUE value, const char *id, int len, XMLRPC_CASE id_case)
const char * XMLRPC_SetValueString (XMLRPC_VALUE value, const char *val, int len)
void XMLRPC_SetValueInt (XMLRPC_VALUE value, int val)
void XMLRPC_SetValueBoolean (XMLRPC_VALUE value, int val)
int XMLRPC_SetIsVector (XMLRPC_VALUE value, XMLRPC_VECTOR_TYPE type)
XMLRPC_VALUE XMLRPC_CreateVector (const char *id, XMLRPC_VECTOR_TYPE type)
static int isDuplicateEntry (XMLRPC_VALUE target, XMLRPC_VALUE source)
int XMLRPC_AddValueToVector (XMLRPC_VALUE target, XMLRPC_VALUE source)
int XMLRPC_AddValuesToVector (XMLRPC_VALUE target,...)
XMLRPC_VALUE XMLRPC_VectorGetValueWithID_Case (XMLRPC_VALUE vector, const char *id, XMLRPC_CASE_COMPARISON id_case)
int XMLRPC_VectorRemoveValue (XMLRPC_VALUE vector, XMLRPC_VALUE value)
XMLRPC_VALUE XMLRPC_CreateValueString (const char *id, const char *val, int len)
XMLRPC_VALUE XMLRPC_CreateValueInt (const char *id, int i)
XMLRPC_VALUE XMLRPC_CreateValueBoolean (const char *id, int i)
void XMLRPC_CleanupValue (XMLRPC_VALUE value)
void XMLRPC_SetValueDateTime (XMLRPC_VALUE value, time_t time)
XMLRPC_VALUE XMLRPC_CopyValue (XMLRPC_VALUE value)
XMLRPC_VALUE XMLRPC_DupValueNew (XMLRPC_VALUE xSource)
XMLRPC_VALUE XMLRPC_CreateValueDateTime (const char *id, time_t time)
void XMLRPC_SetValueDateTime_ISO8601 (XMLRPC_VALUE value, const char *s)
XMLRPC_VALUE XMLRPC_CreateValueDateTime_ISO8601 (const char *id, const char *s)
void XMLRPC_SetValueBase64 (XMLRPC_VALUE value, const char *s, int len)
XMLRPC_VALUE XMLRPC_CreateValueBase64 (const char *id, const char *s, int len)
void XMLRPC_SetValueDouble (XMLRPC_VALUE value, double val)
XMLRPC_VALUE XMLRPC_CreateValueDouble (const char *id, double d)
const char * XMLRPC_GetValueString (XMLRPC_VALUE value)
int XMLRPC_GetValueStringLen (XMLRPC_VALUE value)
int XMLRPC_GetValueInt (XMLRPC_VALUE value)
int XMLRPC_GetValueBoolean (XMLRPC_VALUE value)
double XMLRPC_GetValueDouble (XMLRPC_VALUE value)
const char * XMLRPC_GetValueBase64 (XMLRPC_VALUE value)
time_t XMLRPC_GetValueDateTime (XMLRPC_VALUE value)
const char * XMLRPC_GetValueDateTime_ISO8601 (XMLRPC_VALUE value)
const char * XMLRPC_GetValueID (XMLRPC_VALUE value)
int XMLRPC_VectorSize (XMLRPC_VALUE value)
XMLRPC_VALUE XMLRPC_VectorRewind (XMLRPC_VALUE value)
XMLRPC_VALUE XMLRPC_VectorNext (XMLRPC_VALUE value)
XMLRPC_VALUE_TYPE XMLRPC_GetValueType (XMLRPC_VALUE value)
XMLRPC_VECTOR_TYPE XMLRPC_GetVectorType (XMLRPC_VALUE value)
XMLRPC_VALUE_TYPE_EASY XMLRPC_GetValueTypeEasy (XMLRPC_VALUE value)
XMLRPC_SERVER XMLRPC_ServerCreate ()
XMLRPC_SERVER XMLRPC_GetGlobalServer ()
void XMLRPC_ServerDestroy (XMLRPC_SERVER server)
int XMLRPC_ServerRegisterMethod (XMLRPC_SERVER server, const char *name, XMLRPC_Callback cb)
server_methodfind_method (XMLRPC_SERVER server, const char *name)
const char * type_to_str (XMLRPC_VALUE_TYPE type, XMLRPC_VECTOR_TYPE vtype)
XMLRPC_Callback XMLRPC_ServerFindMethod (XMLRPC_SERVER server, const char *callName)
XMLRPC_VALUE XMLRPC_ServerCallMethod (XMLRPC_SERVER server, XMLRPC_REQUEST request, void *userData)
static XMLRPC_OPTIONS XMLRPC_GetDefaultOptions ()
XMLRPC_CASE XMLRPC_GetDefaultIdCase ()
XMLRPC_CASE XMLRPC_SetDefaultIdCase (XMLRPC_CASE id_case)
XMLRPC_CASE_COMPARISON XMLRPC_GetDefaultIdCaseComparison ()
XMLRPC_CASE_COMPARISON XMLRPC_SetDefaultIdCaseComparison (XMLRPC_CASE_COMPARISON id_case_compare)
XMLRPC_VALUE XMLRPC_UtilityCreateFault (int fault_code, const char *fault_string)
int XMLRPC_ValueIsFault (XMLRPC_VALUE value)
int XMLRPC_ResponseIsFault (XMLRPC_REQUEST response)
int XMLRPC_GetValueFaultCode (XMLRPC_VALUE value)
int XMLRPC_GetResponseFaultCode (XMLRPC_REQUEST response)
const char * XMLRPC_GetValueFaultString (XMLRPC_VALUE value)
const char * XMLRPC_GetResponseFaultString (XMLRPC_REQUEST response)
void XMLRPC_Free (void *mem)
const char * XMLRPC_GetVersionString ()

Variables

static const char rcsid [] = "#(@) $Id: xmlrpc.c 270900 2008-12-09 17:22:12Z iliaa $"

Class Documentation

struct _xmlrpc_options

Definition at line 2596 of file xmlrpc.c.

Class Members
XMLRPC_CASE id_case
XMLRPC_CASE_COMPARISON id_case_compare

Define Documentation

#define XMLRPC_IS_NUMBER (   x)    if (x < '0' || x > '9') return -1;

Typedef Documentation

typedef struct _xmlrpc_options * XMLRPC_OPTIONS

Function Documentation

static int date_from_ISO8601 ( const char *  text,
time_t *  value 
) [static]

Definition at line 185 of file xmlrpc.c.

                                                                {
   struct tm tm;
   int n;
   int i;
   char buf[30];
       

       if (strchr (text, '-')) {
              char *p = (char *) text, *p2 = buf;
              while (p && *p) {
                     if (*p != '-') {
                            *p2 = *p;
                            p2++;
                            if (p2-buf >= sizeof(buf)) {
                                   return -1;
                            }
                     }
                     p++;
              }
                     text = buf;
       }


   tm.tm_isdst = -1;

#define XMLRPC_IS_NUMBER(x) if (x < '0' || x > '9') return -1;

   n = 1000;
   tm.tm_year = 0;
   for(i = 0; i < 4; i++) {
      XMLRPC_IS_NUMBER(text[i])
      tm.tm_year += (text[i]-'0')*n;
      n /= 10;
   }
   n = 10;
   tm.tm_mon = 0;
   for(i = 0; i < 2; i++) {
      XMLRPC_IS_NUMBER(text[i])
      tm.tm_mon += (text[i+4]-'0')*n;
      n /= 10;
   }
   tm.tm_mon --;

   n = 10;
   tm.tm_mday = 0;
   for(i = 0; i < 2; i++) {
      XMLRPC_IS_NUMBER(text[i])
      tm.tm_mday += (text[i+6]-'0')*n;
      n /= 10;
   }

   n = 10;
   tm.tm_hour = 0;
   for(i = 0; i < 2; i++) {
      XMLRPC_IS_NUMBER(text[i])
      tm.tm_hour += (text[i+9]-'0')*n;
      n /= 10;
   }

   n = 10;
   tm.tm_min = 0;
   for(i = 0; i < 2; i++) {
      XMLRPC_IS_NUMBER(text[i])
      tm.tm_min += (text[i+12]-'0')*n;
      n /= 10;
   }

   n = 10;
   tm.tm_sec = 0;
   for(i = 0; i < 2; i++) {
      XMLRPC_IS_NUMBER(text[i])
      tm.tm_sec += (text[i+15]-'0')*n;
      n /= 10;
   }

   tm.tm_year -= 1900;

   *value = mkgmtime(&tm);

   return 0;

}

Here is the call graph for this function:

Here is the caller graph for this function:

static int date_to_ISO8601 ( time_t  value,
char *  buf,
int  length 
) [static]

Definition at line 268 of file xmlrpc.c.

                                                                 {
   struct tm *tm, tmbuf;
   tm = php_gmtime_r(&value, &tmbuf);
   if (!tm) {
          return 0;
   }
#if 0  /* TODO: soap seems to favor this method. xmlrpc the latter. */
       return strftime (buf, length, "%Y-%m-%dT%H:%M:%SZ", tm);
#else
   return strftime(buf, length, "%Y%m%dT%H:%M:%SZ", tm);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

server_method* find_method ( XMLRPC_SERVER  server,
const char *  name 
)

Definition at line 2450 of file xmlrpc.c.

                                                                   {
   server_method* sm;

   q_iter qi = Q_Iter_Head_F(&server->methodlist);

   while( qi ) {
      sm = Q_Iter_Get_F(qi);
      if(sm && !strcmp(sm->name, name)) {
         return sm;
      }
      qi = Q_Iter_Next_F(qi);
   }
   return NULL;
}

Here is the caller graph for this function:

static int isDuplicateEntry ( XMLRPC_VALUE  target,
XMLRPC_VALUE  source 
) [static]

Definition at line 1122 of file xmlrpc.c.

                                                                      {
   return 0;
}

Here is the caller graph for this function:

static XMLRPC_VALUE map_expat_errors ( XML_ELEM_ERROR  error) [static]

Definition at line 752 of file xmlrpc.c.

                                                           {
   XMLRPC_VALUE xReturn = NULL;
   if(error) {
      XMLRPC_ERROR_CODE code;
      char buf[1024];
      snprintf(buf, sizeof(buf), 
               "error occurred at line %ld, column %ld, byte index %ld", 
                                    error->line, error->column, error->byte_index);

      /* expat specific errors */
      switch(error->parser_code) {
      case XML_ERROR_UNKNOWN_ENCODING:
         code = xmlrpc_error_parse_unknown_encoding;
         break;
      case XML_ERROR_INCORRECT_ENCODING:
         code = xmlrpc_error_parse_bad_encoding;
         break;
      default:
         code = xmlrpc_error_parse_xml_syntax;
         break;
      }
      xReturn = XMLRPC_UtilityCreateFault(code, buf);
   }
   return xReturn;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static time_t mkgmtime ( struct tm *  tm) [static]

Definition at line 176 of file xmlrpc.c.

{
    static const int mdays[12] = {0,31,59,90,120,151,181,212,243,273,304,334};

    return ((((((tm->tm_year - 70) * 365) + mdays[tm->tm_mon] + tm->tm_mday-1 +
                  (tm->tm_year-68-1+(tm->tm_mon>=2))/4) * 24) + tm->tm_hour) * 60 +
        tm->tm_min) * 60 + tm->tm_sec;
}

Here is the caller graph for this function:

const char* type_to_str ( XMLRPC_VALUE_TYPE  type,
XMLRPC_VECTOR_TYPE  vtype 
)

Definition at line 2466 of file xmlrpc.c.

                                                                          {
    switch(type) {
       case xmlrpc_none:
          return "none";
       case xmlrpc_empty:
          return "empty";
       case xmlrpc_base64:
          return "base64";
       case xmlrpc_boolean:
          return "boolean";
       case xmlrpc_datetime:
          return "datetime";
       case xmlrpc_double:
          return "double";
       case xmlrpc_int:
          return "int";
       case xmlrpc_string:
          return "string";
       case xmlrpc_vector:
          switch(vtype) {
             case xmlrpc_vector_none:
                return "none";
             case xmlrpc_vector_array:
                return "array";
             case xmlrpc_vector_mixed:
                return "mixed vector (struct)";
             case xmlrpc_vector_struct:
                return "struct";
          }
    }
    return "unknown";
}

Here is the caller graph for this function:

int XMLRPC_AddValuesToVector ( XMLRPC_VALUE  target,
  ... 
)

Definition at line 1211 of file xmlrpc.c.

                                                       {
   int iRetval = 0;

   if(target) {
      if(target->type == xmlrpc_vector) {
         XMLRPC_VALUE v = NULL;
         va_list vl;

         va_start(vl, target);

         do {
            v = va_arg(vl, XMLRPC_VALUE);
            if(v) {
               if(!XMLRPC_AddValueToVector(target, v)) {
                  iRetval = 0;
                  break;
               }
            }
                     }
                     while (v);

         va_end(vl);

         if(NULL == v) {
            iRetval = 1;
         }
      }
   }
   return iRetval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1148 of file xmlrpc.c.

                                                                      {
   if(target && source) {
      if(target->type == xmlrpc_vector && target->v && 
         target->v->q && target->v->type != xmlrpc_vector_none) {

         /* guard against putting value of unknown type into vector */
         switch(source->type) {
            case xmlrpc_empty:
            case xmlrpc_base64:
            case xmlrpc_boolean:
            case xmlrpc_datetime:
            case xmlrpc_double:
            case xmlrpc_int:
            case xmlrpc_string:
            case xmlrpc_vector:
               /* Guard against putting a key/val pair into an array vector */
               if( !(source->id.len && target->v->type == xmlrpc_vector_array) ) {
                                   if (isDuplicateEntry (target, source)
                                           || Q_PushTail (target->v->q, XMLRPC_CopyValue (source))) {
                     return 1;
                  }
               }
               else {
                                   /* fprintf (stderr,
                                                        "xmlrpc: attempted to add key/val pair to vector of type array\n"); */
               }
               break;
            default:
                            /* fprintf (stderr,
                                                 "xmlrpc: attempted to add value of unknown type to vector\n"); */
               break;
         }
      }
   }
   return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1437 of file xmlrpc.c.

                                             {
   if(value) {
      if(value->iRefCount > 0) {
         value->iRefCount --;
      }

#ifdef XMLRPC_DEBUG_REFCOUNT
      if(value->id.str) {
                     printf ("decremented refcount of %s, now %i\n", value->id.str,
                                     value->iRefCount);
      }
      else {
                     printf ("decremented refcount of 0x%x, now %i\n", value,
                                     value->iRefCount);
      }
#endif

      if(value->type == xmlrpc_vector) {
         if(value->v) {
            if(value->iRefCount == 0) {
               XMLRPC_VALUE cur = (XMLRPC_VALUE)Q_Head(value->v->q);
               while( cur ) {
                  XMLRPC_CleanupValue(cur);
   
                  /* Make sure some idiot didn't include a vector as a child of itself
                   * and thus it would have already free'd these.
                   */
                  if(value->v && value->v->q) {
                     cur = Q_Next(value->v->q);
                  }
                  else {
                     break;
                  }
               }

               Q_Destroy(value->v->q);
               my_free(value->v->q);
               my_free(value->v);
            }
         }
      }


      if(value->iRefCount == 0) {

         /* guard against freeing invalid types */
         switch(value->type) {
            case xmlrpc_empty:
            case xmlrpc_base64:
            case xmlrpc_boolean:
            case xmlrpc_datetime:
            case xmlrpc_double:
            case xmlrpc_int:
            case xmlrpc_string:
            case xmlrpc_vector:
#ifdef XMLRPC_DEBUG_REFCOUNT
               if(value->id.str) {
                  printf("free'd %s\n", value->id.str);
               }
               else {
                  printf("free'd 0x%x\n", value);
               }
#endif 
               simplestring_free(&value->id);
               simplestring_free(&value->str);

               memset(value, 0, sizeof(STRUCT_XMLRPC_VALUE));
               my_free(value);
               break;
            default:
                            /* fprintf (stderr,
                                                 "xmlrpc: attempted to free value of invalid type\n"); */
               break;
         }
      }
   }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1576 of file xmlrpc.c.

                                                  {
   if(value) {
      value->iRefCount ++;
#ifdef XMLRPC_DEBUG_REFCOUNT
      if(value->id.str) {
                     printf ("incremented refcount of %s, now %i\n", value->id.str,
                                     value->iRefCount);
              }
              else {
                     printf ("incremented refcount of 0x%x, now %i\n", value,
                                     value->iRefCount);
      }
#endif
   }
   return value;
}

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_CreateValueBase64 ( const char *  id,
const char *  s,
int  len 
)

Definition at line 1825 of file xmlrpc.c.

                                                                              {
   XMLRPC_VALUE val = XMLRPC_CreateValueEmpty();
   if(val) {
      XMLRPC_SetValueBase64(val, s, len);
      if(id) {
         XMLRPC_SetValueID(val, id, 0);
      }
   }
   return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_CreateValueBoolean ( const char *  id,
int  i 
)

Definition at line 1397 of file xmlrpc.c.

                                                              {
   XMLRPC_VALUE val = XMLRPC_CreateValueEmpty();
   if(val) {
      XMLRPC_SetValueBoolean(val, i);
      if(id) {
         XMLRPC_SetValueID(val, id, 0);
      }
   }
   return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_CreateValueDateTime ( const char *  id,
time_t  time 
)

Definition at line 1683 of file xmlrpc.c.

                                                                     {
   XMLRPC_VALUE val = XMLRPC_CreateValueEmpty();
   if(val) {
      XMLRPC_SetValueDateTime(val, time);
      if(id) {
         XMLRPC_SetValueID(val, id, 0);
      }
   }
   return val;
}

Here is the call graph for this function:

XMLRPC_VALUE XMLRPC_CreateValueDateTime_ISO8601 ( const char *  id,
const char *  s 
)

Definition at line 1756 of file xmlrpc.c.

                                                                               {
   XMLRPC_VALUE val = XMLRPC_CreateValueEmpty();
   if(val) {
      XMLRPC_SetValueDateTime_ISO8601(val, s);
      if(id) {
         XMLRPC_SetValueID(val, id, 0);
      }
   }
   return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_CreateValueDouble ( const char *  id,
double  d 
)

Definition at line 1883 of file xmlrpc.c.

                                                                {
   XMLRPC_VALUE val = XMLRPC_CreateValueEmpty();
   if(val) {
      XMLRPC_SetValueDouble(val, d);
      if(id) {
         XMLRPC_SetValueID(val, id, 0);
      }
   }
   return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 856 of file xmlrpc.c.

                                       {
   XMLRPC_VALUE v = calloc(1, sizeof(STRUCT_XMLRPC_VALUE));
   if(v) {
#ifdef XMLRPC_DEBUG_REFCOUNT
              printf ("calloc'd 0x%x\n", v);
#endif
      v->type = xmlrpc_empty;
      simplestring_init(&v->id);
      simplestring_init(&v->str);
   }
   return v;
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_CreateValueInt ( const char *  id,
int  i 
)

Definition at line 1365 of file xmlrpc.c.

                                                          {
   XMLRPC_VALUE val = XMLRPC_CreateValueEmpty();
   if(val) {
      XMLRPC_SetValueInt(val, i);
      if(id) {
         XMLRPC_SetValueID(val, id, 0);
      }
   }
   return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_CreateValueString ( const char *  id,
const char *  val,
int  len 
)

Definition at line 1330 of file xmlrpc.c.

                                                                                {
   XMLRPC_VALUE value = NULL;
   if(val) {
      value = XMLRPC_CreateValueEmpty();
      if(value) {
         XMLRPC_SetValueString(value, val, len);
         if(id) {
            XMLRPC_SetValueID(value, id, 0);
         }
      }
   }
   return value;
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_CreateVector ( const char *  id,
XMLRPC_VECTOR_TYPE  type 
)

Definition at line 1089 of file xmlrpc.c.

                                                                          {
   XMLRPC_VALUE val = NULL;

   val = XMLRPC_CreateValueEmpty();
   if(val) {
      if(XMLRPC_SetIsVector(val, type)) {
         if(id) {
            const char *pSVI = NULL;

            pSVI = XMLRPC_SetValueID(val, id, 0);
            if(NULL == pSVI) {
               val = NULL;
            }
         }
      }
      else {
         val = NULL;
      }
   }
   return val;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1618 of file xmlrpc.c.

                                                       {
       XMLRPC_VALUE xReturn = NULL;
       if (xSource) {
              xReturn = XMLRPC_CreateValueEmpty ();
              if (xSource->id.len) {
                     XMLRPC_SetValueID (xReturn, xSource->id.str, xSource->id.len);
              }

              switch (xSource->type) {
              case xmlrpc_int:
              case xmlrpc_boolean:
                     XMLRPC_SetValueInt (xReturn, xSource->i);
                     break;
              case xmlrpc_string:
              case xmlrpc_base64:
                     XMLRPC_SetValueString (xReturn, xSource->str.str, xSource->str.len);
                     break;
              case xmlrpc_datetime:
                     XMLRPC_SetValueDateTime (xReturn, xSource->i);
                     break;
              case xmlrpc_double:
                     XMLRPC_SetValueDouble (xReturn, xSource->d);
                     break;
              case xmlrpc_vector:
                     {
                            q_iter qi = Q_Iter_Head_F (xSource->v->q);
                            XMLRPC_SetIsVector (xReturn, xSource->v->type);

                            while (qi) {
                                   XMLRPC_VALUE xIter = Q_Iter_Get_F (qi);
                                   XMLRPC_AddValueToVector (xReturn, XMLRPC_DupValueNew (xIter));
                                   qi = Q_Iter_Next_F (qi);
                            }
                     }
                     break;
              default:
                     break;
              }
       }
       return xReturn;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPC_Free ( void *  mem)

Definition at line 2976 of file xmlrpc.c.

                            {
   my_free(mem);
}

Definition at line 2628 of file xmlrpc.c.

Here is the call graph for this function:

Definition at line 2679 of file xmlrpc.c.

Here is the call graph for this function:

Definition at line 2602 of file xmlrpc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2352 of file xmlrpc.c.

                                       {
   static XMLRPC_SERVER xsServer = 0;
   if(!xsServer) {
      xsServer = XMLRPC_ServerCreate();
   }
   return xsServer;
}

Here is the call graph for this function:

Definition at line 2905 of file xmlrpc.c.

Here is the call graph for this function:

const char* XMLRPC_GetResponseFaultString ( XMLRPC_REQUEST  response)

Definition at line 2948 of file xmlrpc.c.

Here is the call graph for this function:

const char* XMLRPC_GetValueBase64 ( XMLRPC_VALUE  value)

Definition at line 2033 of file xmlrpc.c.

                                                      {
    return ((value && value->type == xmlrpc_base64) ? value->str.str : 0);
}

Here is the caller graph for this function:

Definition at line 1984 of file xmlrpc.c.

                                               {
    return ((value && value->type == xmlrpc_boolean) ? value->i : 0);
}

Here is the caller graph for this function:

Definition at line 2058 of file xmlrpc.c.

                                                   {
    return (time_t)((value && value->type == xmlrpc_datetime) ? value->i : 0);
}

Here is the caller graph for this function:

Definition at line 2081 of file xmlrpc.c.

                                                                {
    return ((value && value->type == xmlrpc_datetime) ? value->str.str : 0);
}

Here is the caller graph for this function:

Definition at line 2008 of file xmlrpc.c.

                                                 {
    return ((value && value->type == xmlrpc_double) ? value->d : 0);
}

Here is the caller graph for this function:

Definition at line 2882 of file xmlrpc.c.

                                                  {
   return XMLRPC_VectorGetIntWithID(value, "faultCode");
}

Here is the caller graph for this function:

const char* XMLRPC_GetValueFaultString ( XMLRPC_VALUE  value)

Definition at line 2927 of file xmlrpc.c.

                                                            {
   return XMLRPC_VectorGetStringWithID(value, "faultString");
}

Here is the caller graph for this function:

const char* XMLRPC_GetValueID ( XMLRPC_VALUE  value)

Definition at line 2105 of file xmlrpc.c.

                                                  {
    return (const char*)((value && value->id.len) ? value->id.str : 0);
}

Here is the caller graph for this function:

Definition at line 1960 of file xmlrpc.c.

                                           {
    return ((value && value->type == xmlrpc_int) ? value->i : 0);
}

Here is the caller graph for this function:

const char* XMLRPC_GetValueString ( XMLRPC_VALUE  value)

Definition at line 1913 of file xmlrpc.c.

                                                      {
    return ((value && value->type == xmlrpc_string) ? value->str.str : 0);
}

Here is the caller graph for this function:

Definition at line 1936 of file xmlrpc.c.

                                                 {
    return ((value) ? value->str.len : 0);
}

Here is the caller graph for this function:

Definition at line 2215 of file xmlrpc.c.

                                                          {
   return value ? value->type : xmlrpc_empty;
}

Here is the caller graph for this function:

Definition at line 2269 of file xmlrpc.c.

                                                                    {
       if (value) {
              switch (value->type) {
              case xmlrpc_vector:
                     switch (value->v->type) {
                     case xmlrpc_vector_none:
                            return xmlrpc_type_none;
                     case xmlrpc_vector_struct:
                            return xmlrpc_type_struct;
                     case xmlrpc_vector_mixed:
                            return xmlrpc_type_mixed;
                     case xmlrpc_vector_array:
                            return xmlrpc_type_array;
                     }
              default:
                     /* evil cast, but we know they are the same */
                     return(XMLRPC_VALUE_TYPE_EASY) value->type;
              }
       }
       return xmlrpc_none;
}

Here is the caller graph for this function:

Definition at line 2243 of file xmlrpc.c.

                                                            {
   return(value && value->v) ? value->v->type : xmlrpc_none;
}

Here is the caller graph for this function:

const char* XMLRPC_GetVersionString ( void  )

Definition at line 2997 of file xmlrpc.c.

                                       {
   return XMLRPC_VERSION_STR;
}

Here is the caller graph for this function:

XMLRPC_REQUEST XMLRPC_REQUEST_FromXML ( const char *  in_buf,
int  len,
XMLRPC_REQUEST_INPUT_OPTIONS  in_options 
)

Definition at line 797 of file xmlrpc.c.

                                                                                                                                    {
   XMLRPC_REQUEST request = XMLRPC_RequestNew();
   STRUCT_XML_ELEM_ERROR error = {0};

   if(request) {
              xml_element *root_elem =
              xml_elem_parse_buf (in_buf, len,
                                                          (in_options ? &in_options->xml_elem_opts : NULL),
                                                          &error);

      if(root_elem) {
         if(!strcmp(root_elem->name, "simpleRPC")) {
            request->output.version = xmlrpc_version_simple;
            xml_element_to_DANDARPC_REQUEST(request, root_elem);
         }
                     else if (!strcmp (root_elem->name, "SOAP-ENV:Envelope")) {
                            request->output.version = xmlrpc_version_soap_1_1;
                            xml_element_to_SOAP_REQUEST (request, root_elem);
                     }
         else {
            request->output.version = xmlrpc_version_1_0;
            xml_element_to_XMLRPC_REQUEST(request, root_elem);
         }
         xml_elem_free(root_elem);
      }
      else {
         if(error.parser_error) {
                            XMLRPC_RequestSetError (request, map_expat_errors (&error));
         }
      }
   }

   return request;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* XMLRPC_REQUEST_ToXML ( XMLRPC_REQUEST  request,
int buf_len 
)

Definition at line 690 of file xmlrpc.c.

                                                                 {
      char* pRet = NULL;
       if (request) {
              xml_element *root_elem = NULL;
              if (request->output.version == xmlrpc_version_simple) {
                     root_elem = DANDARPC_REQUEST_to_xml_element (request);
              }
              else if (request->output.version == xmlrpc_version_1_0 ||
                                   request->output.version == xmlrpc_version_none) {
                     root_elem = XMLRPC_REQUEST_to_xml_element (request);
              }
              else if (request->output.version == xmlrpc_version_soap_1_1) {
                     root_elem = SOAP_REQUEST_to_xml_element (request);
              }

      if(root_elem) {
                     pRet =
                     xml_elem_serialize_to_string (root_elem,
                                                                                           &request->output.xml_elem_opts,
                                                                                           buf_len);
         xml_elem_free(root_elem);
      }
   }
       return pRet;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPC_RequestFree ( XMLRPC_REQUEST  request,
int  bFreeIO 
)

Definition at line 328 of file xmlrpc.c.

                                                             {
   if(request) {
      simplestring_free(&request->methodName);

      if(request->io && bFreeIO) {
         XMLRPC_CleanupValue(request->io);
      }
      if(request->error) {
         XMLRPC_CleanupValue(request->error);
      }
      my_free(request);
   }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 505 of file xmlrpc.c.

                                                           {
   return request ? request->io : NULL;
}

Here is the caller graph for this function:

Definition at line 561 of file xmlrpc.c.

                                                             {
       return request ? request->error : NULL;
}

Here is the caller graph for this function:

const char* XMLRPC_RequestGetMethodName ( XMLRPC_REQUEST  request)

Definition at line 387 of file xmlrpc.c.

                                                                {
   return request ? request->methodName.str : NULL;
}

Here is the caller graph for this function:

Definition at line 620 of file xmlrpc.c.

                                                                                     {
   return request ? &request->output : NULL;
}

Here is the caller graph for this function:

Definition at line 443 of file xmlrpc.c.

                                                                         {
   return request ? request->request_type : xmlrpc_request_none;
}

Here is the caller graph for this function:

Definition at line 303 of file xmlrpc.c.

                                   {
   XMLRPC_REQUEST xRequest = calloc(1, sizeof(STRUCT_XMLRPC_REQUEST));
   if(xRequest) {
      simplestring_init(&xRequest->methodName);
   }
   return xRequest;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 473 of file xmlrpc.c.

                                                                              {
   if(request && data) {
              if (request->io) {
                     XMLRPC_CleanupValue (request->io);
              }
      request->io = XMLRPC_CopyValue(data);
      return request->io;
   }
   return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 530 of file xmlrpc.c.

                                                                                 {
       if (request && error) {
              if (request->error) {
                     XMLRPC_CleanupValue (request->error);
              }
              request->error = XMLRPC_CopyValue (error);
              return request->error;
       }
       return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* XMLRPC_RequestSetMethodName ( XMLRPC_REQUEST  request,
const char *  methodName 
)

Definition at line 361 of file xmlrpc.c.

                                                                                        {
   if(request) {
      simplestring_clear(&request->methodName);
      simplestring_add(&request->methodName, methodName);
      return request->methodName.str;
   }
   return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 589 of file xmlrpc.c.

                                                                                                                           {
   if(request && output) {
              memcpy (&request->output, output,
                              sizeof (STRUCT_XMLRPC_REQUEST_OUTPUT_OPTIONS));
      return &request->output;
   }
   return NULL;
}

Here is the caller graph for this function:

Definition at line 412 of file xmlrpc.c.

                                                                                                                                            {
   if(request) {
      request->request_type = type;
      return request->request_type;
   }
   return xmlrpc_request_none;
}

Here is the caller graph for this function:

Definition at line 2859 of file xmlrpc.c.

                                                    {
   return XMLRPC_ValueIsFault( XMLRPC_RequestGetData(response) );
}

Here is the call graph for this function:

XMLRPC_VALUE XMLRPC_ServerCallMethod ( XMLRPC_SERVER  server,
XMLRPC_REQUEST  request,
void *  userData 
)

Definition at line 2560 of file xmlrpc.c.

                                                                                                   {
   XMLRPC_VALUE xReturn = NULL;

   /* check for error set during request parsing / generation */
   if(request && request->error) {
      xReturn = XMLRPC_CopyValue(request->error);
   }
       else if (server && request) {
              XMLRPC_Callback cb =
              XMLRPC_ServerFindMethod (server, request->methodName.str);
      if(cb) {
         xReturn = cb(server, request, userData);
      }
      else {
                     xReturn =
                     XMLRPC_UtilityCreateFault (xmlrpc_error_unknown_method,
                                                                                    request->methodName.str);
      }
   }
   return xReturn;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2317 of file xmlrpc.c.

                                    {
   XMLRPC_SERVER server = calloc(1, sizeof(STRUCT_XMLRPC_SERVER));
   if(server) {
      Q_Init(&server->methodlist);
      Q_Init(&server->docslist);

      /* register system methods */
      xsm_register(server);
   }
   return server;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2379 of file xmlrpc.c.

                                                {
   if(server) {
      doc_method* dm = Q_Head(&server->docslist);
      server_method* sm = Q_Head(&server->methodlist);
      while( dm ) {
         my_free(dm);
         dm = Q_Next(&server->docslist);
      }
      while( sm ) {
         if(sm->name) {
            my_free(sm->name);
         }
         if(sm->desc) {
            XMLRPC_CleanupValue(sm->desc);
         }
         my_free(sm);
         sm = Q_Next(&server->methodlist);
      }
      if(server->xIntrospection) {
         XMLRPC_CleanupValue(server->xIntrospection);
      }

      Q_Destroy(&server->methodlist);
      Q_Destroy(&server->docslist);
      my_free(server);
   }
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_Callback XMLRPC_ServerFindMethod ( XMLRPC_SERVER  server,
const char *  callName 
)

Definition at line 2518 of file xmlrpc.c.

                                                                                    {
   if(server && callName) {
      q_iter qi = Q_Iter_Head_F(&server->methodlist);
      while( qi ) {
         server_method* sm = Q_Iter_Get_F(qi);
         if(sm && !strcmp(sm->name, callName)) {
            return sm->method;
         }
         qi = Q_Iter_Next_F(qi);
      }
   }
   return NULL;
}

Here is the caller graph for this function:

int XMLRPC_ServerRegisterMethod ( XMLRPC_SERVER  server,
const char *  name,
XMLRPC_Callback  cb 
)

Definition at line 2432 of file xmlrpc.c.

                                                                                            {
   if(server && name && cb) {

      server_method* sm = malloc(sizeof(server_method));
      
      if(sm) {
         sm->name = strdup(name);
         sm->method = cb;
         sm->desc = NULL;

         return Q_PushTail(&server->methodlist, sm);
      }
   }
   return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2653 of file xmlrpc.c.

                                                         {
   XMLRPC_OPTIONS options = XMLRPC_GetDefaultOptions();
   options->id_case = id_case;
   return options->id_case;
}

Here is the call graph for this function:

Definition at line 2704 of file xmlrpc.c.

                                                                                                 {
   XMLRPC_OPTIONS options = XMLRPC_GetDefaultOptions();
   options->id_case_compare = id_case_compare;
   return options->id_case_compare;
}

Here is the call graph for this function:

Definition at line 1036 of file xmlrpc.c.

                                                                    {
   int bSuccess = 0;

       if (value) {
              /* we can change the type so long as nothing is currently stored. */
              if(value->type == xmlrpc_vector) {
                     if(value->v) {
                            if(!Q_Size(value->v->q)) {
                                   value->v->type = type;
                            }
                     }
              }
              else {
      value->v = calloc(1, sizeof(STRUCT_XMLRPC_VECTOR));
      if(value->v) {
         value->v->q = (queue*)malloc(sizeof(queue));
         if(value->v->q) {
            Q_Init(value->v->q);
            value->v->type = type;
            value->type = xmlrpc_vector;
            bSuccess = 1;
         }
      }
   }
       }

   return bSuccess;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPC_SetValueBase64 ( XMLRPC_VALUE  value,
const char *  s,
int  len 
)

Definition at line 1792 of file xmlrpc.c.

                                                                       {
   if(value && s) {
      simplestring_clear(&value->str);
      (len > 0) ? simplestring_addn(&value->str, s, len) :
                  simplestring_add(&value->str, s);
      value->type = xmlrpc_base64;
   }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPC_SetValueBoolean ( XMLRPC_VALUE  value,
int  val 
)

Definition at line 1004 of file xmlrpc.c.

                                                         {
   if(value) {
      value->type = xmlrpc_boolean;
      value->i = val ? 1 : 0;
   }
}

Here is the caller graph for this function:

void XMLRPC_SetValueDateTime ( XMLRPC_VALUE  value,
time_t  time 
)

Definition at line 1537 of file xmlrpc.c.

                                                              {
   if(value) {
      char timeBuf[30];
      value->type = xmlrpc_datetime;
      value->i = time;

      timeBuf[0] = 0;

      date_to_ISO8601(time, timeBuf, sizeof(timeBuf));

      if(timeBuf[0]) {
         XMLRPC_SetValueDateTime_ISO8601 (value, timeBuf);
      }
   }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPC_SetValueDateTime_ISO8601 ( XMLRPC_VALUE  value,
const char *  s 
)

Definition at line 1720 of file xmlrpc.c.

                                                                        {
   if(value) {
      time_t time_val = 0;
      if(s) {
         value->type = xmlrpc_datetime;
         date_from_ISO8601(s, &time_val);
         value->i = time_val;
         simplestring_clear(&value->str);
         simplestring_add(&value->str, s);
      }
   }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPC_SetValueDouble ( XMLRPC_VALUE  value,
double  val 
)

Definition at line 1856 of file xmlrpc.c.

                                                           {
   if(value) {
      value->type = xmlrpc_double;
      value->d = val;
   }
}

Here is the caller graph for this function:

const char* XMLRPC_SetValueID_Case ( XMLRPC_VALUE  value,
const char *  id,
int  len,
XMLRPC_CASE  id_case 
)

Definition at line 892 of file xmlrpc.c.

                                                                                                     {
   const char* pRetval = NULL;
   if(value) {
      if(id) {
         simplestring_clear(&value->id);
         (len > 0) ? simplestring_addn(&value->id, id, len) :
                     simplestring_add(&value->id, id);

         /* upper or lower case string in place if required. could be a seperate func. */
         if(id_case == xmlrpc_case_lower || id_case == xmlrpc_case_upper) {
            int i;
            for(i = 0; i < value->id.len; i++) {
                                   value->id.str[i] =
                                   (id_case ==
                                    xmlrpc_case_lower) ? tolower (value->id.
                                                                                                          str[i]) : toupper (value->
                                                                                                                                                     id.
                                                                                                                                                     str[i]);
            }
         }

         pRetval = value->id.str;

#ifdef XMLRPC_DEBUG_REFCOUNT
         printf("set value id: %s\n", pRetval);
#endif 
      }
   }

   return pRetval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPC_SetValueInt ( XMLRPC_VALUE  value,
int  val 
)

Definition at line 978 of file xmlrpc.c.

                                                     {
   if(value) {
      value->type = xmlrpc_int;
      value->i = val;
   }
}

Here is the caller graph for this function:

const char* XMLRPC_SetValueString ( XMLRPC_VALUE  value,
const char *  val,
int  len 
)

Definition at line 946 of file xmlrpc.c.

                                                                                {
   char *pRetval = NULL;
   if(value && val) {
      simplestring_clear(&value->str);
      (len > 0) ? simplestring_addn(&value->str, val, len) :
                  simplestring_add(&value->str, val);
      value->type = xmlrpc_string;
      pRetval = (char *)value->str.str;
   }

   return pRetval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_UtilityCreateFault ( int  fault_code,
const char *  fault_string 
)

Definition at line 2755 of file xmlrpc.c.

                                                                                 {
   XMLRPC_VALUE xOutput = NULL;

   char* string = NULL;
   simplestring description;
   simplestring_init(&description);

   switch (fault_code) {
       case xmlrpc_error_parse_xml_syntax:
              string = xmlrpc_error_parse_xml_syntax_str;
              break;
       case xmlrpc_error_parse_unknown_encoding:
              string = xmlrpc_error_parse_unknown_encoding_str;
              break;
       case xmlrpc_error_parse_bad_encoding:
              string = xmlrpc_error_parse_bad_encoding_str;
              break;
       case xmlrpc_error_invalid_xmlrpc:
              string = xmlrpc_error_invalid_xmlrpc_str;
              break;
       case xmlrpc_error_unknown_method:
              string = xmlrpc_error_unknown_method_str;
              break;
       case xmlrpc_error_invalid_params:
              string = xmlrpc_error_invalid_params_str;
              break;
       case xmlrpc_error_internal_server:
              string = xmlrpc_error_internal_server_str;
              break;
       case xmlrpc_error_application:
              string = xmlrpc_error_application_str;
              break;
       case xmlrpc_error_system:
              string = xmlrpc_error_system_str;
              break;
       case xmlrpc_error_transport:
              string = xmlrpc_error_transport_str;
              break;
   }

   simplestring_add(&description, string);

   if(string && fault_string) {
      simplestring_add(&description, "\n\n");
   }
   simplestring_add(&description, fault_string);


   if(description.len) {
      xOutput = XMLRPC_CreateVector(NULL, xmlrpc_vector_struct);

              XMLRPC_VectorAppendString (xOutput, "faultString", description.str,
                                                                             description.len);
      XMLRPC_VectorAppendInt(xOutput, "faultCode", fault_code);
   }

   simplestring_free(&description);

   return xOutput;
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPC_VALUE XMLRPC_VALUE_FromXML ( const char *  in_buf,
int  len,
XMLRPC_REQUEST_INPUT_OPTIONS  in_options 
)

Definition at line 738 of file xmlrpc.c.

                                                                                                         {
   XMLRPC_VALUE xResponse = NULL;
   XMLRPC_REQUEST req = XMLRPC_REQUEST_FromXML(in_buf, len, in_options);

   if(req) {
      xResponse = req->io;
      XMLRPC_RequestFree(req, 0);
   }
   return xResponse;
}

Here is the call graph for this function:

char* XMLRPC_VALUE_ToXML ( XMLRPC_VALUE  val,
int buf_len 
)

Definition at line 656 of file xmlrpc.c.

                                                         {
   xml_element *root_elem = XMLRPC_VALUE_to_xml_element(val);
   char* pRet = NULL;

   if(root_elem) {
      pRet = xml_elem_serialize_to_string(root_elem, NULL, buf_len);
      xml_elem_free(root_elem);
   }
   return pRet;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2834 of file xmlrpc.c.

                                             {
   if( XMLRPC_VectorGetValueWithID(value, "faultCode") &&
       XMLRPC_VectorGetValueWithID(value, "faultString") ) {
      return 1;
   }
   return 0;
}

Here is the caller graph for this function:

Definition at line 1264 of file xmlrpc.c.

                                                                                                                                           {
   if(vector && vector->v && vector->v->q) {
       q_iter qi = Q_Iter_Head_F(vector->v->q);

       while(qi) {
          XMLRPC_VALUE xIter = Q_Iter_Get_F(qi);
          if(xIter && xIter->id.str) {
             if(id_case == xmlrpc_case_sensitive) {
                if(!strcmp(xIter->id.str, id)) {
                   return xIter;
                }
             }
             else if(id_case == xmlrpc_case_insensitive) {
                if(!strcasecmp(xIter->id.str, id)) {
                   return xIter;
                }
             }
          }
          qi = Q_Iter_Next_F(qi);
       }
   }
   return NULL;
}

Definition at line 2184 of file xmlrpc.c.

                                                   {
   XMLRPC_VALUE xReturn = NULL;
   if(value && value->type == xmlrpc_vector && value->v) {
      xReturn = (XMLRPC_VALUE)Q_Next(value->v->q);
   }
   return xReturn;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1292 of file xmlrpc.c.

                                                                      {
   if(vector && vector->v && vector->v->q && value) {
       q_iter qi = Q_Iter_Head_F(vector->v->q);

       while(qi) {
          XMLRPC_VALUE xIter = Q_Iter_Get_F(qi);
          if(xIter == value) {
             XMLRPC_CleanupValue(xIter);
             Q_Iter_Del(vector->v->q, qi);
             return 1;
          }
          qi = Q_Iter_Next_F(qi);
       }
   }
   return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2158 of file xmlrpc.c.

                                                     {
   XMLRPC_VALUE xReturn = NULL;
   if(value && value->type == xmlrpc_vector && value->v) {
      xReturn = (XMLRPC_VALUE)Q_Head(value->v->q);
   }
   return xReturn;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2130 of file xmlrpc.c.

                                          {
   int size = 0;
   if(value && value->type == xmlrpc_vector && value->v) {
      size = Q_Size(value->v->q);
   }
   return size;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char rcsid[] = "#(@) $Id: xmlrpc.c 270900 2008-12-09 17:22:12Z iliaa $" [static]

Definition at line 34 of file xmlrpc.c.