FACT++  1.0
int prepareJSONHeader ( )

Definition at line 1819 of file webDid.c.

References addJSONChildEnd(), addJSONChildStart(), addJSONEnd(), addJSONNodeEnd(), addJSONNodeStart(), addJSONStart(), JSONHeader, N_servers, N_services, sprintf(), str, Title, and WebDID_Debug.

Referenced by getJSONHeader(), and update_servers().

1820 {
1821  char *ptr;
1822  char str[128];
1823 
1824  ptr = JSONHeader;
1825  *ptr = '\0';
1826  ptr = addJSONStart(ptr);
1827  ptr = addJSONNodeStart(ptr,"items");
1828  sprintf(str,"text: \"%s\"",Title);
1829  ptr = addJSONChildStart(ptr,str,0);
1830  ptr = addJSONChildEnd(ptr,1);
1831  sprintf(str,"text: \"%d Servers Known - %d Services Available\"",N_servers, N_services);
1832  ptr = addJSONChildStart(ptr,str,0);
1833  ptr = addJSONChildEnd(ptr,0);
1834  ptr = addJSONNodeEnd(ptr);
1835  ptr = addJSONEnd(ptr);
1836 if(WebDID_Debug)
1837 printf(" Header %s\n",JSONHeader);
1838  return(1);
1839 }
char * addJSONNodeEnd(char *ptr)
Definition: webDid.c:1380
int N_servers
Definition: webDid.c:105
char Title[128]
Definition: webDid.c:120
int N_services
Definition: webDid.c:106
int WebDID_Debug
Definition: webServer.c:7
char str[80]
Definition: test_client.c:7
char * addJSONChildEnd(char *ptr, int sep)
Definition: webDid.c:1401
char * addJSONChildStart(char *ptr, char *child, int sep)
Definition: webDid.c:1389
char * addJSONEnd(char *ptr)
Definition: webDid.c:1362
char * addJSONNodeStart(char *ptr, char *node)
Definition: webDid.c:1371
char JSONHeader[256]
Definition: webDid.c:92
char * addJSONStart(char *ptr)
Definition: webDid.c:1353
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: