2 OpenChange OCPF (OpenChange Property File) implementation.
4 Copyright (C) Julien Kerihuel 2008-2010.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "libmapi/libmapi.h"
27 struct ocpf_var *prev;
28 struct ocpf_var *next;
36 struct ocpf_oleguid *prev;
37 struct ocpf_oleguid *next;
44 struct ocpf_property *prev;
45 struct ocpf_property *next;
53 const char *mnid_string;
68 struct ocpf_nproperty *prev;
69 struct ocpf_nproperty *next;
72 const char *mnid_string;
79 struct ocpf_recipients
81 struct ocpf_recipients *prev;
82 struct ocpf_recipients *next;
84 enum ocpf_recipClass class;
95 /* lexer internal data */
100 union SPropValue_CTR lpProp;
102 struct ocpf_nprop nprop;
107 struct ocpf_var *vars;
108 struct ocpf_oleguid *oleguid;
109 struct ocpf_property *props;
110 struct ocpf_nproperty *nprops;
111 struct ocpf_recipients *recipients;
112 struct SPropValue *lpProps;
117 const char *filename;
121 struct ocpf_context *prev;
122 struct ocpf_context *next;
128 struct ocpf_freeid *prev;
129 struct ocpf_freeid *next;
135 struct ocpf_context *context;
136 struct ocpf_freeid *free_id;
141 #include "libocpf/ocpf_private.h"
146 #define OCPF_WARN(c,x) (ocpf_do_debug(c, x))
148 #define OCPF_RETVAL_IF(x, c, msg, mem_ctx) \
151 ocpf_do_debug(c, "%s", msg); \
153 talloc_free(mem_ctx); \
159 #define OCPF_RETVAL_TYPE(x, c, msg, t, mem_ctx) \
162 ocpf_do_debug(c, "%s", msg); \
164 talloc_free(mem_ctx); \
170 #define OCPF_INITIALIZED "OCPF context has already been initialized"
171 #define OCPF_NOT_INITIALIZED "OCPF context has not been initialized"
172 #define OCPF_INVALID_CONTEXT "Invalid OCPF context"
174 #define OCPF_WRITE_NOT_INITIALIZED "OCPF write context has not been initialized"
176 #define OCPF_FATAL_ERROR "Fatal error encountered"
177 #define OCPF_WARN_FILENAME_INVALID "Invalid filename"
178 #define OCPF_WARN_FILENAME_EXIST "filename already exists"
179 #define OCPF_WARN_FILENAME_STAT "Unable to stat file"
181 #define OCPF_WARN_PROP_REGISTERED "Property already registered"
182 #define OCPF_WARN_PROP_TYPE "Property type not supported"
183 #define OCPF_WARN_PROP_UNKNOWN "Property Unknown"
185 #define OCPF_WARN_OOM_UNKNOWN "Unknown OOM"
186 #define OCPF_WARN_OOM_REGISTERED "OOM already registered"
188 #define OCPF_WARN_LID_UNKNOWN "Unknown MNID_ID"
189 #define OCPF_WARN_LID_REGISTERED "MNID_ID already registered"
191 #define OCPF_WARN_STRING_UNKNOWN "Unknown MNID_STRING"
192 #define OCPF_WARN_STRING_REGISTERED "MNID_STRING already registered"
195 #define OCPF_WARN_OLEGUID_N_REGISTERED "OLEGUID name already registered"
196 #define OCPF_WARN_OLEGUID_G_REGISTERED "OLEGUID GUID already registered"
197 #define OCPF_WARN_OLEGUID_UNREGISTERED "OLEGUID unregistered"
198 #define OCPF_WARN_OLEGUID_INVALID "OLEGUID invalid"
200 #define OCPF_WARN_VAR_REGISTERED "Variable already registered"
201 #define OCPF_WARN_VAR_NOT_REGISTERED "Unknown variable"
202 #define OCPF_WARN_VAR_TYPE "Variable property type not supported"
204 #define OCPF_WARN_FOLDER_ID_UNKNOWN "Unknown Folder"
206 #define OCPF_WARN_PROPVALUE_MISMATCH "Property type and value mismatch"
208 #define OCPF_INVALID_PROPARRAY "Invalid property array"
209 #define OCPF_INVALID_FILEHANDLE "Invalid file handle"
212 #define OCPF_PROPERTY_BEGIN "PROPERTY {\n"
213 #define OCPF_NPROPERTY_BEGIN "NPROPERTY {\n"
214 #define OCPF_END "};\n"
215 #define OCPF_NEWLINE "\n"
216 #define OCPF_RECIPIENT_TO "RECIPIENT TO "
217 #define OCPF_RECIPIENT_CC "RECIPIENT CC "
218 #define OCPF_RECIPIENT_BCC "RECIPIENT BCC "
220 #define DATE_FORMAT "%Y-%m-%d %H:%M:%S"
222 #endif /* __OCPF_API_H_ */