00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef INCL_FILEDATA
00021 #define INCL_FILEDATA
00022
00024 #include "base/util/ArrayElement.h"
00025 #include "base/util/WString.h"
00026 #include "base/util/StringBuffer.h"
00027
00028 class FileData : public ArrayElement {
00029
00030
00031 private:
00032 WString file;
00033 WString name;
00034 WString created;
00035 WString modified;
00036 WString accessed;
00037 WString attributes;
00038 bool hidden;
00039 bool system;
00040 bool archived;
00041 bool deleted;
00042 bool writable;
00043 bool readable;
00044 bool executable;
00045 WString cttype;
00046 StringBuffer body;
00047 WString enc;
00048 int size;
00049
00050
00051 bool isHiddenPresent;
00052 bool isSystemPresent;
00053 bool isArchivedPresent;
00054 bool isDeletedPresent;
00055 bool isWritablePresent;
00056 bool isReadablePresent;
00057 bool isExecutablePresent;
00058
00059
00060
00061
00062 int lengthForB64(int len);
00063
00064 public:
00065
00066 FileData();
00067 ~FileData();
00068
00069
00070 const WCHAR* getFile() { return file; }
00071 void setFile(const WCHAR* v) { file = v; }
00072
00073 const WCHAR* getName() { return name; }
00074 void setName(const WCHAR* v) { name = v; }
00075
00076 const WCHAR* getCreated() { return created; }
00077 void setCreated(const WCHAR* v) { created = v; }
00078
00079 const WCHAR* getModified() { return modified; }
00080 void setModified(const WCHAR* v) { modified = v; }
00081
00082 const WCHAR* getAccessed() { return accessed; }
00083 void setAccessed(const WCHAR* v) { accessed = v; }
00084
00085 const WCHAR* getAttributes() { return file; }
00086 void setAttributes(const WCHAR* v) { attributes = v; }
00087
00088 bool getHiddied() { return hidden; }
00089 void setHidden(bool v) { hidden = v; }
00090
00091 bool getSystem() { return system; }
00092 void setSystem(bool v) { system = v; }
00093
00094 bool getArchived() { return archived; }
00095 void setArchived(bool v) { archived = v; }
00096
00097 bool getDeleted() { return deleted; }
00098 void setDeleted(bool v) { deleted = v; }
00099
00100 bool getWritable() { return writable; }
00101 void setWritable(bool v) { writable = v; }
00102
00103 bool getReadable() { return readable; }
00104 void setReadable(bool v) { readable = v; }
00105
00106 bool getExecutable() { return executable; }
00107 void setExecutable(bool v) { executable = v; }
00108
00109 const WCHAR* getCttype() { return cttype; }
00110 void setCttype(const WCHAR* v) { cttype = v; }
00111
00112 const char* getBody() { return body; }
00113 void setBody(const char* v, int len);
00114
00115 const WCHAR* getEnc() { return enc; }
00116 void setEnc(const WCHAR* v) { enc = v; }
00117
00118 int getSize() { return size; }
00119 void setSize(int v) { size = v; }
00120
00121 int parse(StringBuffer* s) ;
00122
00123
00124 int parse(const char *syncmlData, size_t len = WString::npos) ;
00125 int parse(const void *syncmlData, size_t len) ;
00126
00127 char *format() ;
00128
00129 ArrayElement* clone() { return new FileData(*this); }
00130
00131 };
00132
00134 #endif
00135