src/include/common/spds/SyncSourceConfig.h

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 
00037 
00038 #ifndef INCL_SYNC_SOURCE_CONFIG
00039     #define INCL_SYNC_SOURCE_CONFIG
00040 
00044     #include "spds/AbstractSyncSourceConfig.h"
00045 #include "base/globalsdef.h"
00046 
00047 BEGIN_NAMESPACE
00048 
00054 class SyncSourceConfig : public AbstractSyncSourceConfig {
00055 
00056     protected:
00057 
00058         char*  name             ;
00059         char*  uri              ;
00060         char*  syncModes        ;
00061         char*  type             ;
00062         char*  sync             ;
00063         char*  encodings        ;
00064         char*  version          ;
00065         char*  supportedTypes   ;
00066         char*  encryption       ;
00067         // last anchor, set by the engine.
00068         unsigned long last      ;
00069         // CTCap data
00070         bool fieldLevel         ;
00071         ArrayList ctCaps        ;
00072 
00078         CTCap* createCtCap(ArrayList *props, const char *ct_Type, const char *ver_CT, bool fLevel);
00079 
00080     public:
00081 
00085         SyncSourceConfig();
00086 
00090         ~SyncSourceConfig();
00091 
00095         const char*  getName() const;
00096 
00102         void setName(const char*  n);
00103 
00107         const char*  getURI() const;
00108 
00114         void setURI(const char*  u);
00115 
00129         const char*  getSyncModes() const;
00130 
00137         void setSyncModes(const char*  s);
00138 
00142         const char* getType() const;
00143 
00149         void setType(const char*  t);
00150 
00154         const char*  getSync() const;
00155 
00159         void setSync(const char*  s);
00160 
00167         const char*  getEncoding() const;
00168         void setEncoding(const char*  s);
00169 
00170 
00174         const char* getVersion() const;
00175 
00181         void setVersion(const char*  n);
00182 
00183 
00191         const char* getSupportedTypes() const;
00192 
00198         void setSupportedTypes(const char*  s);
00199 
00205         void setLast(unsigned long timestamp);
00206 
00210         unsigned long getLast() const;
00211 
00217         const char* getEncryption() const;
00218 
00224         void setEncryption(const char* n);
00225 
00232         //void setCtCapProperties(ArrayList* props);
00233 
00240         //ArrayList& getCtCapProperties();
00241 
00247         const ArrayList& getCtCaps() const {return ctCaps;};
00248         ArrayList& getCtCaps() {return ctCaps;};
00249 
00266         void  addCtCap(ArrayList* props, const char* ct_Type = 0 , const char* ver_CT = 0, int fLevel = FLEVEL_UNDEFINED);
00267 
00273         void assign(const SyncSourceConfig& sc);
00274 
00280         bool getFieldLevel(){ return false;}
00281 
00285         SyncSourceConfig& operator = (const SyncSourceConfig& sc) {
00286             assign(sc);
00287             return *this;
00288         }
00289     };
00290 
00291 
00292 END_NAMESPACE
00293 
00296 #endif

Generated on Fri Jul 25 15:04:15 2008 for Funambol C++ Client Library by  doxygen 1.5.1