Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

serialize.h

Go to the documentation of this file.
00001 /********************************************************************
00002 
00003 Copyright © 2006, ACCESS Systems Americas, Inc. All rights reserved.
00004 
00005 The contents of this file are subject to the Mozilla Public License Version
00006 1.1 (the "License"); you may not use this file except in compliance with
00007 the License. You may obtain a copy of the License at
00008 http://www.mozilla.org/MPL/
00009 
00010 Software distributed under the License is distributed on an "AS IS" basis,
00011 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012 for the specific language governing rights and limitations under the
00013 License.
00014 
00015 The Original Code is the entire contents of this file.
00016 
00017 The Initial Developer of the Original Code is ACCESS Systems Americas, Inc.
00018 
00019 Portions created by ACCESS Systems Americas, Inc. are Copyright © 2006. All
00020 Rights Reserved.
00021 
00022 Contributor(s): none.
00023 
00024 ********************************************************************/
00034 #ifndef __SERIALIZE_H__
00035 #define __SERIALIZE_H__
00036 
00037 
00038 #include <glib.h>
00039 #include <stdint.h>
00040 
00041 #include "hiker/global_settings.h"
00042 
00043 
00044 struct serialize_buf
00045 {
00046     void *data;
00047     void *current;
00048     int length;
00049 };
00050 
00051 typedef struct serialize_buf serialize_buf;
00052 
00053 serialize_buf * make_serialize_buf(void);
00054 
00055 void clean_serialize_buf(serialize_buf *);
00056 void free_serialize_buf(serialize_buf *);
00057 
00058 int serialize_bool(serialize_buf *, gboolean);
00059 int serialize_int(serialize_buf *, int);
00060 int serialize_float(serialize_buf *, double);
00061 int serialize_string(serialize_buf *, const char *);
00062 int serialize_blob(serialize_buf *, const char *, int length);
00063 
00064 
00065 int deserialize_bool(serialize_buf *, gboolean *);
00066 int deserialize_int(serialize_buf *, int *);
00067 int deserialize_float(serialize_buf *, double *);
00068 int deserialize_string(serialize_buf *, char **, int *length);
00069 int deserialize_blob(serialize_buf *, char **, int *length);
00070 
00071 int serialize_gs_value(serialize_buf *, const AlpGlobalSettingsValue *);
00072 
00073 int deserialize_gs_value(serialize_buf *, AlpGlobalSettingsValue *);
00074 
00075 #endif

Generated on Sat Dec 16 20:29:47 2006 for hiker-0.9 by  doxygen 1.4.4