PERFORCE change 121817 for review
Andrew Turner
andrew at FreeBSD.org
Sun Jun 17 03:18:21 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=121817
Change 121817 by andrew at andrew_hermies on 2007/06/17 03:17:56
Add object handeling functions that will be used with <data/> elements
Affected files ...
.. //depot/projects/soc2007/andrew-update/lib/Makefile#2 edit
.. //depot/projects/soc2007/andrew-update/lib/facund_object.c#1 add
.. //depot/projects/soc2007/andrew-update/lib/facund_object.h#1 add
.. //depot/projects/soc2007/andrew-update/lib/facund_private.h#3 edit
Differences ...
==== //depot/projects/soc2007/andrew-update/lib/Makefile#2 (text+ko) ====
@@ -1,6 +1,6 @@
LIB=facund
-SRCS=facund_connection.c facund_server.c
+SRCS=facund_connection.c facund_object.c facund_server.c
WARNS=6
==== //depot/projects/soc2007/andrew-update/lib/facund_private.h#3 (text+ko) ====
@@ -28,11 +28,30 @@
#ifndef FACUND_PRIVATE_H
#define FACUND_PRIVATE_H
+#include "facund_object.h"
+
#include <sys/socket.h>
#include <sys/un.h>
#include <bsdxml.h>
+struct facund_object {
+ enum facund_type obj_type;
+ int obj_assigned;
+ enum facund_object_error obj_error;
+
+ /* Used when this is part of an array */
+ struct facund_object *obj_parent;
+
+ int32_t obj_int; /* Used in bool, int and uint types */
+ char *obj_string; /* Used in string type */
+ struct facund_object **obj_array;/* Used in array type */
+ size_t obj_array_count;
+
+ /* Used for indenting arrays */
+ unsigned int obj_depth;
+};
+
struct facund_conn {
int do_unlink; /* If true unlink the socket on close */
struct sockaddr_un local; /* The local connection */
@@ -42,6 +61,9 @@
int fd; /* The fd to the remote device */
XML_Parser parser;
+ char current_call[32];
+ char call_id[8];
+ struct facund_object *call_arg;
};
#endif /* FACUND_PRIVATE_H */
More information about the p4-projects
mailing list