src/include/common/spds/MailSyncSourceConfig.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_MAIL_SYNC_SOURCE_CONFIG
00039     #define INCL_MAIL_SYNC_SOURCE_CONFIG
00040 
00042     #include "base/fscapi.h"
00043     #include "spds/constants.h"
00044     #include "spds/SyncSourceConfig.h"
00045 #include "base/globalsdef.h"
00046 
00047 BEGIN_NAMESPACE
00048 
00049     class MailSyncSourceConfig : public SyncSourceConfig {
00050 
00051     private:
00052 
00060         int downloadAge;
00061 
00069         int bodySize;
00070 
00078         int attachSize;
00079 
00080         /*
00081         * represent the folder that have to be synched. 1 is the folder to sync, 0 is to avoid
00082         */
00083         int inbox;
00084         int outbox;
00085         int draft;
00086         int trash;
00087         int sent;
00088 
00089         /*
00090         * it represent the time of the schedule
00091         */
00092         int schedule;
00093 
00094     public:
00095 
00096         /*
00097          * Constructs a new MailSyncSourceConfig object
00098          */
00099         MailSyncSourceConfig();
00100 
00101         /*
00102          * Constructs a new SyncSourceConfig object from an other.
00103          */
00104         MailSyncSourceConfig(MailSyncSourceConfig& c);
00105 
00106         /*
00107          * Destructor
00108          */
00109         ~MailSyncSourceConfig();
00110 
00111         /*
00112          * Sets the downloadAge
00113          *
00114          * @param age the new downloadAge
00115          */
00116         void setDownloadAge(int age);
00117 
00118         /*
00119          * Returns downloadAge
00120          */
00121         int getDownloadAge() const;
00122 
00123         /*
00124          * Sets the bodySize
00125          *
00126          * @param size the new bodySize
00127          */
00128         void setBodySize(int size);
00129 
00130         /*
00131          * Returns bodySize
00132          */
00133         int getBodySize() const;
00134 
00135         /*
00136          * Sets the attachSize
00137          *
00138          * @param size the new attachSize
00139          */
00140         void setAttachSize(int size);
00141 
00142         /*
00143          * Returns attachSize
00144          */
00145         int getAttachSize() const;
00146 
00147 
00148         void setInbox(int v);
00149 
00150         int  getInbox() const;
00151 
00152         void setOutbox(int v);
00153 
00154         int  getOutbox() const;
00155 
00156         void setDraft(int v);
00157 
00158         int  getDraft() const;
00159 
00160         void setTrash(int v);
00161 
00162         int  getTrash() const;
00163 
00164         void setSent(int v);
00165 
00166         int  getSent() const;
00167 
00168         void setSchedule(int v);
00169 
00170         int  getSchedule() const;
00171 
00172 
00178         void assign(const MailSyncSourceConfig& sc);
00179 
00180         StringBuffer print();
00181     };
00182 
00183 
00184 END_NAMESPACE
00185 
00187 #endif

Generated on Wed Jan 14 17:15:36 2009 for Funambol C++ Client Library by  doxygen 1.5.2