src/include/common/vocl/VConverter.h

00001 
00020 #ifndef INCL_VIRTUAL_CONVERTER
00021 #define INCL_VIRTUAL_CONVERTER
00022 
00024 #include "VObject.h"
00025 
00026 class VConverter{
00027 
00028 public:
00029     static VObject* parse(const WCHAR* buffer);
00030 
00031 private:
00032     static VProperty* readFieldHeader(WCHAR* buffer);
00033     static bool readFieldBody(WCHAR* buffer, VProperty* property);
00034 
00035     // Extract the parameter of certain properties, e.g. "BEGIN:" or "VERSION:".
00036     // The result is a pointer into buffCopy, which is expected to have
00037     // buffCopyLen wchars and will be reallocated if necessary.
00038     static WCHAR* extractObjectProperty(const WCHAR* buffer, const WCHAR *property,
00039                                           WCHAR * &buffCopy, size_t &buffCopyLen);
00040 
00041     // extractObjectType() and extractObjectVersion() contain static buffers,
00042     // copy the result before calling these functions again!
00043     static WCHAR* extractObjectType(const WCHAR* buffer);
00044     static WCHAR* extractObjectVersion(const WCHAR* buffer);
00045     static bool extractGroup(WCHAR* propertyName, WCHAR* propertyGroup);
00046     
00047 };
00049 #endif

Generated on Fri Apr 27 12:29:19 2007 for Funambol C++ Client Library by  doxygen 1.5.2