src/include/common/spds/FolderData.h

00001 /*
00002  * Copyright (C) 2003-2007 Funambol
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 
00020 #ifndef INCL_FOLDERDATA
00021 #define INCL_FOLDERDATA
00022 
00024 #include "base/util/ArrayElement.h"
00025 #include "base/util/WString.h"
00026 #include "base/util/StringBuffer.h"
00027 
00028 class FolderData : public ArrayElement {
00029     
00030     // ------------------------------------------------------- Private data
00031     private:
00032         //WString folder;
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 role;
00046                         
00047         // represents the presence of their equivalent tag
00048         bool isHiddenPresent;
00049         bool isSystemPresent;
00050         bool isArchivedPresent;
00051         bool isDeletedPresent;
00052         bool isWritablePresent;
00053         bool isReadablePresent;
00054         bool isExecutablePresent;
00055 
00056         /*
00057         * return the length for the base64 array starting from length of the original array
00058         */
00059         int lengthForB64(int len);
00060 
00061     public:
00062     // ------------------------------------------------------- Constructors
00063         FolderData();
00064         ~FolderData();
00065 
00066     // ---------------------------------------------------------- Accessors  
00067                 /*const WCHAR* getFolder() { return folder; }
00068                 void setFolder(const WCHAR* v) { folder = v; } */
00069 
00070                 const WCHAR* getName() { return name; }
00071                 void setName(const WCHAR* v) { name = v; }
00072 
00073                 const WCHAR* getCreated() { return created; }
00074                 void setCreated(const WCHAR* v) { created = v; }
00075 
00076                 const WCHAR* getModified() { return modified; }
00077                 void setModified(const WCHAR* v) { modified = v; }
00078 
00079                 const WCHAR* getAccessed() { return accessed; }
00080                 void setAccessed(const WCHAR* v) { accessed = v; }
00081 
00082                 const WCHAR* getAttributes() { return attributes; }
00083                 void setAttributes(const WCHAR* v) { attributes = v; }
00084                 
00085                 bool getHidded() { return hidden; }
00086                 void setHidden(bool v) { hidden = v; }
00087 
00088                 bool getSystem() { return system; }
00089                 void setSystem(bool v) { system = v; }
00090 
00091                 bool getArchived() { return archived; }
00092                 void setArchived(bool v) { archived = v; }
00093 
00094                 bool getDeleted() { return deleted; }
00095                 void setDeleted(bool v) { deleted = v; }
00096 
00097                 bool getWritable() { return writable; }
00098                 void setWritable(bool v) { writable = v; }
00099                 
00100                 bool getReadable() { return readable; }
00101                 void setReadable(bool v) { readable = v; }
00102 
00103                 bool getExecutable() { return executable; }
00104                 void setExecutable(bool v) { executable = v; }
00105 
00106                 const WCHAR* getRole() { return role; }
00107                 void setRole(const WCHAR* v) { role = v; } 
00108         
00109         
00110     // ----------------------------------------------------- Public Methods
00111         int parse(const char *syncmlData, size_t len = WString::npos) ;
00112         char *format() ;
00113 
00114         ArrayElement* clone() { return new FolderData(*this); }
00115    
00116 };
00117 
00119 #endif
00120 

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