00001 /* 00002 * Funambol is a mobile platform developed by Funambol, Inc. 00003 * Copyright (C) 2003 - 2007 Funambol, Inc. 00004 * 00005 * This program is free software; you can redistribute it and/or modify it under 00006 * the terms of the GNU Affero General Public License version 3 as published by 00007 * the Free Software Foundation with the addition of the following permission 00008 * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED 00009 * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE 00010 * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. 00011 * 00012 * This program is distributed in the hope that it will be useful, but WITHOUT 00013 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00014 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00015 * details. 00016 * 00017 * You should have received a copy of the GNU Affero General Public License 00018 * along with this program; if not, see http://www.gnu.org/licenses or write to 00019 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00020 * MA 02110-1301 USA. 00021 * 00022 * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite 00023 * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. 00024 * 00025 * The interactive user interfaces in modified source and object code versions 00026 * of this program must display Appropriate Legal Notices, as required under 00027 * Section 5 of the GNU Affero General Public License version 3. 00028 * 00029 * In accordance with Section 7(b) of the GNU Affero General Public License 00030 * version 3, these Appropriate Legal Notices must retain the display of the 00031 * "Powered by Funambol" logo. If the display of the logo is not reasonably 00032 * feasible for technical reasons, the Appropriate Legal Notices must display 00033 * the words "Powered by Funambol". 00034 */ 00035 00036 #ifndef INCL_WINSYNC_SOURCE_CONFIG 00037 #define INCL_WINSYNC_SOURCE_CONFIG 00038 00043 #include "spds/SyncSourceConfig.h" 00044 #include "DateFilter.h" 00045 00046 using namespace Funambol; 00047 00057 class WindowsSyncSourceConfig { 00058 00059 private: 00060 00062 char* folderPath; 00063 00066 bool useSubfolders; 00067 00069 bool isSynced; 00070 00072 long endTimestamp; 00073 00074 00079 SyncSourceConfig* s; 00080 00086 DateFilter dateFilter; 00087 00088 00090 void initialize(); 00091 00092 00093 public: 00094 00096 WindowsSyncSourceConfig(); 00099 WindowsSyncSourceConfig(SyncSourceConfig* sc); 00100 00102 WindowsSyncSourceConfig(const WindowsSyncSourceConfig& wsc); 00103 00105 ~WindowsSyncSourceConfig(); 00106 00108 WindowsSyncSourceConfig& operator = (const WindowsSyncSourceConfig& wsc); 00109 00111 void setCommonConfig(SyncSourceConfig* sc); 00112 00115 SyncSourceConfig* getCommonConfig(); 00116 00117 00118 // 00119 // ----------------------------- set/get methods ----------------------------- 00120 // 00121 _declspec(dllexport) const char* getFolderPath() const; 00122 _declspec(dllexport) bool getUseSubfolders() const; 00123 _declspec(dllexport) long getEndTimestamp() const; 00124 00125 _declspec(dllexport)void setFolderPath (const char* v); 00126 _declspec(dllexport)void setUseSubfolders (bool v); 00127 _declspec(dllexport)void setEndTimestamp (long v); 00128 00129 // Common properties: get original values in SSconfig 's' 00130 const char* getName() const { return s->getName() ; } 00131 const char* getURI() const { return s->getURI() ; } 00132 const char* getSyncModes() const { return s->getSyncModes() ; } 00133 const char* getType() const { return s->getType() ; } 00134 const char* getSync() const { return s->getSync() ; } 00135 const char* getEncoding() const { return s->getEncoding() ; } 00136 const char* getVersion() const { return s->getVersion() ; } 00137 const char* getSupportedTypes() const { return s->getSupportedTypes(); } 00138 //CTCap getCtCap() const { return s->getCtCap() ; } 00139 unsigned long getLast() const { return s->getLast() ; } 00140 const char* getEncryption() const { return s->getEncryption() ; } 00141 const bool isEnabled() const { return s->isEnabled() ; } 00142 00143 // Common properties: set original values in SSconfig 's' 00144 void setName (const char* v) { s->setName(v) ; } 00145 void setURI (const char* v) { s->setURI(v) ; } 00146 void setSyncModes (const char* v) { s->setSyncModes(v) ; } 00147 void setType (const char* v) { s->setType(v) ; } 00148 void setSync (const char* v) { s->setSync(v) ; } 00149 void setEncoding (const char* v) { s->setEncoding(v) ; } 00150 void setVersion (const char* v) { s->setVersion(v) ; } 00151 void setSupportedTypes(const char* v) { s->setSupportedTypes(v) ; } 00152 //void setCtCap (CTCap v) { s->setCtCap(v) ; } 00153 void setLast (unsigned long v) { s->setLast(v) ; } 00154 void setEncryption (const char* v) { s->setEncryption(v) ; } 00155 void setIsEnabled (const bool v) { s->setIsEnabled(v) ; } 00156 00157 00158 bool getIsSynced() const; 00159 void setIsSynced(bool v); 00160 00162 _declspec(dllexport) DateFilter& getDateFilter() { return dateFilter; } 00163 00164 }; 00165 00168 #endif