nvpair.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
00003 Copyright (C) 2005- The University of Notre Dame
00004 This software is distributed under the GNU General Public License.
00005 See the file COPYING for details.
00006 */
00007 
00008 #ifndef NVPAIR_H
00009 #define NVPAIR_H
00010 
00011 #include <stdio.h>
00012 #include "int_sizes.h"
00013 
00027 struct nvpair *nvpair_create();
00028 
00032 void nvpair_delete(struct nvpair *n);
00033 
00038 void nvpair_parse(struct nvpair *n, const char *text);
00039 
00044 int nvpair_parse_stream(struct nvpair *n, FILE * stream);
00045 
00052 int nvpair_print(struct nvpair *n, char *text, int length);
00053 
00059 int nvpair_print_alloc(struct nvpair *n, char **text);
00060 
00066 void nvpair_insert_string(struct nvpair *n, const char *name, const char *value);
00067  void nvpair_insert_integer(struct nvpair *n, const char *name, INT64_T value);
00073 
00079 const char *nvpair_lookup_string(struct nvpair *n, const char *name);
00080 
00086 INT64_T nvpair_lookup_integer(struct nvpair *n, const char *name);
00087 
00088 typedef enum {
00089         NVPAIR_MODE_STRING,
00090         NVPAIR_MODE_INTEGER,
00091         NVPAIR_MODE_URL,
00092         NVPAIR_MODE_METRIC,
00093         NVPAIR_MODE_TIME,
00094         NVPAIR_MODE_TIMESTAMP
00095 } nvpair_mode_t;
00096 
00097 typedef enum {
00098         NVPAIR_ALIGN_LEFT,
00099         NVPAIR_ALIGN_RIGHT
00100 } nvpair_align_t;
00101 
00102 struct nvpair_header {
00103         const char *name;
00104         nvpair_mode_t mode;
00105         nvpair_align_t align;
00106         int width;
00107 };
00108 
00113 void nvpair_print_text(struct nvpair *n, FILE * stream);
00114 
00119 void nvpair_print_xml(struct nvpair *n, FILE * stream);
00120 
00125 void nvpair_print_new_classads(struct nvpair *n, FILE * stream);
00126 
00131 void nvpair_print_old_classads(struct nvpair *n, FILE * stream);
00132 
00137 void nvpair_print_html_solo(struct nvpair *n, FILE * stream);
00138 
00139 void nvpair_print_html_header(FILE * stream, struct nvpair_header *h);
00140 void nvpair_print_html(struct nvpair *n, FILE * stream, struct nvpair_header *h);
00141 void nvpair_print_html_with_link(struct nvpair *n, FILE * stream, struct nvpair_header *h, const char *linkname, const char *linktext);
00142 
00143 void nvpair_print_html_footer(FILE * stream, struct nvpair_header *h);
00144 
00145 void nvpair_print_table_header(FILE * stream, struct nvpair_header *h);
00146 void nvpair_print_table(struct nvpair *n, FILE * stream, struct nvpair_header *h);
00147 void nvpair_print_table_footer(FILE * stream, struct nvpair_header *h);
00148 
00149 #endif

Generated on Mon Jun 11 03:16:07 2012 for cctools by  doxygen 1.4.7