src/include/common/syncml/core/AbstractCommand.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 
00021 #ifndef INCL_ABSTRACT_COMMAND
00022 #define INCL_ABSTRACT_COMMAND
00023 
00025 #include "base/fscapi.h"
00026 #include "base/util/ArrayElement.h"
00027 #include "syncml/core/CmdID.h"
00028 #include "syncml/core/Meta.h"
00029 #include "syncml/core/Cred.h"
00030 
00031 
00032 
00038 class AbstractCommand : public ArrayElement {
00039 
00040     // ---------------------------------------------------------- Protected data    
00041     protected:
00042         
00043         CmdID*   cmdID ;
00044         BOOL noResp;
00045         Meta*    meta;
00046         Cred*    credential;
00047 
00048         void initialize();
00049     
00050     // ---------------------------------------------------------- Protected data    
00051     public:
00052     AbstractCommand();
00053 
00054     AbstractCommand(CmdID* cmdID, BOOL noResp);        
00055     
00062      AbstractCommand(CmdID* cmdID);
00063           
00072      AbstractCommand(CmdID* cmdID, BOOL noResp, Meta* meta);            
00073 
00074      void set(CmdID* cmdID, BOOL noResp);
00075 
00076      virtual ~AbstractCommand();
00077     
00083      CmdID* getCmdID();
00084     
00091      void setCmdID(CmdID* cmdID);
00092 
00098      BOOL isNoResp();
00099 
00100      BOOL getNoResp();
00101     
00108      void setNoResp(BOOL noResp);
00109     
00115      Cred* getCred();
00116     
00123      void setCred(Cred* cred);
00124      
00130      Meta* getMeta();
00131     
00138      void setMeta(Meta* meta);
00139        
00145     virtual const char* getName() = 0;
00146 
00147     virtual ArrayElement* clone() = 0;
00148         
00149 };
00150 
00152 #endif

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