src/include/common/spds/SyncItemStatus.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  #ifndef INCL_SYNC_ITEM_STATUS
00020     #define INCL_SYNC_ITEM_STATUS
00021 
00023     #include "base/fscapi.h"
00024     #include "base/constants.h"
00025     #include "base/util/ArrayElement.h"
00026     #include "spds/constants.h"
00027 
00028 
00029     class SyncItemStatus : public ArrayElement {
00030 
00031     private:
00032 
00033         int      cmdID ;
00034         int      msgRef;
00035         int      cmdRef;
00036         char*  cmd   ;
00037         char*  key   ;
00038         int      data  ;
00039 
00040     public:
00041         /*
00042          * Default constructor
00043          */
00044         SyncItemStatus() EXTRA_SECTION_01;
00045 
00046         /*
00047          * Constructs a new SyncItemStatus identified by the given key. The key must
00048          * not be longer than DIM_KEY_SYNC_ITEM_STATUS (see SPDS Constants).
00049          *
00050          * @param key - the key
00051          */
00052         SyncItemStatus(char*  key) EXTRA_SECTION_01;
00053 
00054         ~SyncItemStatus() EXTRA_SECTION_01;
00055 
00056         /*
00057          * Returns the SyncItemStatus's key. If key is NULL, the internal buffer is
00058          * returned; if key is not NULL, the value is copied in the caller
00059          * allocated buffer and the given buffer pointer is returned.
00060          */
00061         const char* getKey() EXTRA_SECTION_01;
00062 
00063         /*
00064          * Changes the SyncItemStatus key. The key must not be longer than DIM_KEY_SYNC_ITEM_STATUS
00065          * (see SPDS Constants).
00066          *
00067          * @param key - the key
00068          */
00069         void setKey(const char* key) EXTRA_SECTION_01;
00070 
00071          /*
00072          * Returns the SyncItemStatus's command name. If cmd is NULL, the internal buffer is
00073          * returned; if cmd is not NULL, the value is copied in the caller
00074          * allocated buffer and the given buffer pointer is returned.
00075          */
00076         const char* getCmd() EXTRA_SECTION_01;
00077 
00078         /*
00079          * Changes the SyncItemStatus cmd. The cmd must not be longer than DIM_COMMAND_SYNC_ITEM_STATUS
00080          * (see SPDS Constants).
00081          *
00082          * @param cmd - the cmd
00083          */
00084         void setCmd(const char* cmd) EXTRA_SECTION_01;
00085 
00086 
00087         /*
00088          * Sets the SyncItemStatus data. The passed data are copied into an
00089          * internal variable.
00090          */
00091         void setData(int data) EXTRA_SECTION_01;
00092 
00093         /*
00094          * Returns the SyncItemStatus data variable.
00095          */
00096         int getData() EXTRA_SECTION_01;
00097 
00098 
00099         /*
00100          * Sets the SyncItemStatus command ID. The passed data are copied into an
00101          * internal variable.
00102          */
00103         void setCmdID(int cmdId) EXTRA_SECTION_01;
00104 
00105         /*
00106          * Returns the SyncItemStatus command ID variable.
00107          */
00108         int getCmdID() EXTRA_SECTION_01;
00109 
00110         /*
00111          * Sets the SyncItemStatus message referring. The passed data are copied into an
00112          * internal variable.
00113          */
00114         void setMsgRef(int msgRef) EXTRA_SECTION_01;
00115 
00116         /*
00117          * Returns the SyncItemStatus message referring variable.
00118          */
00119         int getMsgRef() EXTRA_SECTION_01;
00120 
00121         /*
00122          * Sets the SyncItemStatus command referring. The passed data are copied into an
00123          * internal variable.
00124          */
00125         void setCmdRef(int cmdRef) EXTRA_SECTION_01;
00126 
00127         /*
00128          * Returns the SyncItemStatus command referring variable.
00129          */
00130         int getCmdRef() EXTRA_SECTION_01;
00131 
00137         ArrayElement* clone() EXTRA_SECTION_01;
00138 
00139     };
00140 
00142 #endif

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