00001 /* 00002 * Copyright (C) 2006-2007 Funambol, Inc. 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 version 2 as 00006 * published by the Free Software Foundation. 00007 * 00008 * This program is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR 00011 * PURPOSE. See the GNU General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 00016 * 02111-1307 USA 00017 */ 00018 00019 #ifndef INCL_WINSYNC_SOURCE_CONFIG 00020 #define INCL_WINSYNC_SOURCE_CONFIG 00021 00026 #include "spds/SyncSourceConfig.h" 00027 00037 class WindowsSyncSourceConfig { 00038 00039 private: 00040 00042 char* folderPath; 00043 00046 bool useSubfolders; 00047 00049 bool isSynced; 00050 00052 long endTimestamp; 00053 00054 00059 SyncSourceConfig* s; 00060 00061 00063 void initialize(); 00064 00065 00066 public: 00067 00069 WindowsSyncSourceConfig(); 00072 WindowsSyncSourceConfig(SyncSourceConfig* sc); 00073 00075 WindowsSyncSourceConfig(const WindowsSyncSourceConfig& wsc); 00076 00078 ~WindowsSyncSourceConfig(); 00079 00081 WindowsSyncSourceConfig& operator = (const WindowsSyncSourceConfig& wsc); 00082 00084 void setCommonConfig(SyncSourceConfig* sc); 00085 00088 SyncSourceConfig* getCommonConfig(); 00089 00090 00091 // 00092 // ----------------------------- set/get methods ----------------------------- 00093 // 00094 _declspec(dllexport) const char* getFolderPath() const; 00095 _declspec(dllexport) bool getUseSubfolders() const; 00096 _declspec(dllexport) long getEndTimestamp() const; 00097 00098 _declspec(dllexport)void setFolderPath (const char* v); 00099 _declspec(dllexport)void setUseSubfolders (bool v); 00100 _declspec(dllexport)void setEndTimestamp (long v); 00101 00102 // Common properties: get original values in SSconfig 's' 00103 const char* getName() const { return s->getName() ; } 00104 const char* getURI() const { return s->getURI() ; } 00105 const char* getSyncModes() const { return s->getSyncModes() ; } 00106 const char* getType() const { return s->getType() ; } 00107 const char* getSync() const { return s->getSync() ; } 00108 const char* getEncoding() const { return s->getEncoding() ; } 00109 const char* getVersion() const { return s->getVersion() ; } 00110 const char* getSupportedTypes() const { return s->getSupportedTypes(); } 00111 CTCap getCtCap() const { return s->getCtCap() ; } 00112 unsigned long getLast() const { return s->getLast() ; } 00113 const char* getEncryption() const { return s->getEncryption() ; } 00114 00115 // Common properties: set original values in SSconfig 's' 00116 void setName (const char* v) { s->setName(v) ; } 00117 void setURI (const char* v) { s->setURI(v) ; } 00118 void setSyncModes (const char* v) { s->setSyncModes(v) ; } 00119 void setType (const char* v) { s->setType(v) ; } 00120 void setSync (const char* v) { s->setSync(v) ; } 00121 void setEncoding (const char* v) { s->setEncoding(v) ; } 00122 void setVersion (const char* v) { s->setVersion(v) ; } 00123 void setSupportedTypes(const char* v) { s->setSupportedTypes(v) ; } 00124 void setCtCap (CTCap v) { s->setCtCap(v) ; } 00125 void setLast (unsigned long v) { s->setLast(v) ; } 00126 void setEncryption (const char* v) { s->setEncryption(v) ; } 00127 00128 00129 bool getIsSynced() const; 00130 void setIsSynced(bool v); 00131 }; 00132 00135 #endif