ccn_xmltoccnb.c File Reference

Utility to convert XML into ccn binary encoded data (ccnb). More...

Go to the source code of this file.

Defines

#define TOSS_WHITE   1

Functions

static void usage (const char *progname)
static void base64_decode_bytes (struct base64_decoder *d, const void *p, size_t count)
static int dict_lookup (const char *key, const struct ccn_dict_entry *dict, int n)
struct ccn_encoder * ccn_encoder_create (FILE *outfile, const struct ccn_dict *dtags)
void ccn_encoder_destroy (struct ccn_encoder **cbp)
static void emit_bytes (struct ccn_encoder *u, const void *p, size_t length)
static void emit_tt (struct ccn_encoder *u, size_t numval, enum ccn_tt tt)
static int all_whitespace (struct ccn_charbuf *b)
static void finish_openudata (struct ccn_encoder *u)
static void emit_name (struct ccn_encoder *u, enum ccn_tt tt, const void *name)
static void emit_xchars (struct ccn_encoder *u, const XML_Char *xchars)
static void emit_closer (struct ccn_encoder *u)
static void do_start_element (void *ud, const XML_Char *name, const XML_Char **atts)
static void do_end_element (void *ud, const XML_Char *name)
static void do_character_data (void *ud, const XML_Char *s, int len)
static void do_processing_instructions (void *ud, const XML_Char *target, const XML_Char *data)
static int process_fd (int fd, FILE *outfile, int flags, const struct ccn_dict *dtags)
static int process_file (char *path, int flags, const struct ccn_dict *dtags)
int main (int argc, char **argv)


Detailed Description

Utility to convert XML into ccn binary encoded data (ccnb).

A CCNx command-line utility.

Copyright (C) 2008, 2009 Palo Alto Research Center, Inc.

This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition in file ccn_xmltoccnb.c.


Define Documentation

#define TOSS_WHITE   1

Definition at line 391 of file ccn_xmltoccnb.c.

Referenced by main(), and process_fd().


Function Documentation

static int all_whitespace ( struct ccn_charbuf b  )  [static]

Definition at line 200 of file ccn_xmltoccnb.c.

Referenced by finish_openudata().

static void base64_decode_bytes ( struct base64_decoder *  d,
const void *  p,
size_t  count 
) [static]

Definition at line 76 of file ccn_xmltoccnb.c.

Referenced by finish_openudata().

struct ccn_encoder* ccn_encoder_create ( FILE *  outfile,
const struct ccn_dict dtags 
) [read]

Definition at line 148 of file ccn_xmltoccnb.c.

Referenced by process_fd().

void ccn_encoder_destroy ( struct ccn_encoder **  cbp  ) 

Definition at line 164 of file ccn_xmltoccnb.c.

Referenced by process_fd().

static int dict_lookup ( const char *  key,
const struct ccn_dict_entry dict,
int  n 
) [static]

Definition at line 138 of file ccn_xmltoccnb.c.

Referenced by emit_name().

static void do_character_data ( void *  ud,
const XML_Char *  s,
int  len 
) [static]

Definition at line 374 of file ccn_xmltoccnb.c.

Referenced by process_fd().

static void do_end_element ( void *  ud,
const XML_Char *  name 
) [static]

Definition at line 367 of file ccn_xmltoccnb.c.

Referenced by process_fd().

static void do_processing_instructions ( void *  ud,
const XML_Char *  target,
const XML_Char *  data 
) [static]

Definition at line 381 of file ccn_xmltoccnb.c.

Referenced by process_fd().

static void do_start_element ( void *  ud,
const XML_Char *  name,
const XML_Char **  atts 
) [static]

Definition at line 333 of file ccn_xmltoccnb.c.

Referenced by process_fd().

static void emit_bytes ( struct ccn_encoder *  u,
const void *  p,
size_t  length 
) [static]

Definition at line 175 of file ccn_xmltoccnb.c.

Referenced by emit_closer(), emit_name(), emit_tt(), emit_xchars(), and finish_openudata().

static void emit_closer ( struct ccn_encoder *  u  )  [static]

Definition at line 325 of file ccn_xmltoccnb.c.

Referenced by do_end_element(), and do_processing_instructions().

static void emit_name ( struct ccn_encoder *  u,
enum ccn_tt  tt,
const void *  name 
) [static]

Definition at line 298 of file ccn_xmltoccnb.c.

Referenced by do_start_element().

static void emit_tt ( struct ccn_encoder *  u,
size_t  numval,
enum ccn_tt  tt 
) [static]

static void emit_xchars ( struct ccn_encoder *  u,
const XML_Char *  xchars 
) [static]

Definition at line 316 of file ccn_xmltoccnb.c.

Referenced by do_processing_instructions(), and do_start_element().

static void finish_openudata ( struct ccn_encoder *  u  )  [static]

Definition at line 217 of file ccn_xmltoccnb.c.

Referenced by do_processing_instructions(), emit_closer(), emit_name(), and emit_xchars().

int main ( int  argc,
char **  argv 
)

Definition at line 492 of file ccn_xmltoccnb.c.

static int process_fd ( int  fd,
FILE *  outfile,
int  flags,
const struct ccn_dict dtags 
) [static]

Definition at line 393 of file ccn_xmltoccnb.c.

static int process_file ( char *  path,
int  flags,
const struct ccn_dict dtags 
) [static]

Definition at line 432 of file ccn_xmltoccnb.c.

static void usage ( const char *  progname  )  [static]

Definition at line 34 of file ccn_xmltoccnb.c.


Generated on Thu Feb 16 00:44:08 2012 for Content-Centric Networking in C by  doxygen 1.5.6