src/include/common/spds/Email.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_MAIL
00021 #define INCL_MAIL
00022 
00024 #include "base/fscapi.h"
00025 #include "base/util/ArrayElement.h"
00026 #include "base/util/StringBuffer.h"
00027 #include "spds/MailMessage.h"
00028 
00029 class Email : public ArrayElement {
00030     
00031     // ------------------------------------------------------------ Private data
00032     private:
00033         bool read;
00034         bool forwarded;
00035         bool replied;
00036         StringBuffer received;
00037         StringBuffer created;
00038         StringBuffer modified;
00039         bool deleted;
00040         bool flagged;
00041 
00042         MailMessage emailItem;
00043 
00044     public:
00045         
00046     // --------------------------------------------------------------- Accessors  
00047         bool getRead() { return read; }
00048         void setRead(bool v) { read=v; }
00049 
00050         bool getForwarded() { return forwarded; }
00051         void setForwarded(bool v) { forwarded=v; }
00052 
00053         bool getReplied() { return replied; }
00054         void setReplied(bool r) { replied=r; }
00055         
00056         const char * getReceived() { return received; }
00057         void setReceived(const char * v) { received=v; }
00058 
00059         const char * getCreated() { return created; }
00060         void setCreated(const char * v) { created=v; }
00061 
00062         const char * getModified() { return modified; }
00063         void setModified(const char * v) { modified=v; }
00064 
00065         bool getDeleted() { return deleted; }
00066         void setDeleted(bool v) { deleted=v; }
00067 
00068         bool getFlagged() { return flagged; }
00069         void setFlagged(bool v) { flagged=v; }
00070 
00071         MailMessage& getMailMessage() { return emailItem; }
00072         void setMailMessage(const MailMessage& v) { emailItem = v; }
00073 
00074     // ---------------------------------------------------------- Public Methods
00075         int parse(const char *syncmlData) { return 0; }          // TODO
00076         char *format()                     { return wcsdup(""); } // TODO
00077 
00078         ArrayElement* clone() { return new Email(*this); }
00079    
00080 };
00081 
00083 #endif
00084 

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