src/include/common/syncml/core/Authentication.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_AUTHENTICATION
00021 #define INCL_AUTHENTICATION
00022 
00024 #include "base/fscapi.h"
00025 #include "base/util/utils.h"
00026 #include "base/base64.h"
00027 #include "syncml/core/Meta.h"
00028 
00029 class Authentication {
00030     
00031      // ------------------------------------------------------------ Private data
00032     private:
00033         char*  data;
00034         char*  username;
00035         char*  password;
00036         BOOL encode;
00037         char*  deviceId;
00038         char*  syncMLVerProto;
00039         char*  principalId;
00040         Meta* meta;
00041 
00042         void initialize();
00043     
00044     // ---------------------------------------------------------- Public data    
00045     public:
00046 
00047     // ---------------------------------------------------------- Constructor
00048         Authentication();
00049         ~Authentication();
00050         
00054         Authentication(Authentication* auth);
00055     
00063         Authentication(Meta* meta, const char*  data);
00064 
00072         Authentication(const char*  type, const char*  data);
00073 
00082         Authentication(const char*  type,
00083                        const char*  data,
00084                        BOOL encode);
00085 
00094         Authentication(const char*  type,
00095                        const char*  username,
00096                        const char*  password);
00097         
00098         // ---------------------------------------------------------- Public methods
00099 
00100         void createAuthentication(const char*  type, const char*  data);
00101 
00107         const char* getType();
00108 
00114         void setType(const char* type);
00115 
00121         const char* getFormat();
00122 
00128         void setFormat(const char* format);
00129 
00135         const char* getData();
00136 
00143         void setData(const char* data);
00144 
00145 
00151         const char* getUsername();
00152 
00158         void setUsername(const char* username);
00159 
00165         const char* getPassword();
00166 
00172         void setPassword(const char* password);
00173 
00179         NextNonce* getNextNonce();
00180 
00187         void setNextNonce(NextNonce* nextNonce);
00188 
00194         Meta* getMeta();
00195 
00202         void setMeta(Meta* meta);
00203 
00209         const char* getDeviceId();
00210 
00216         void setDeviceId(const char* deviceId);
00217 
00224         const char* getSyncMLVerProto();
00225 
00233          void setSyncMLVerProto(const char* syncMLVerProto);
00234 
00240         const char* getPrincipalId();
00241 
00247         void setPrincipalId(const char* principalId);
00248         
00249         Authentication* clone();
00250 
00251 };
00252 
00254 #endif

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