D:/develop/v65/clients/outlook/install/output/export/funambol/clients/outlook/mainclientDll/src/include/SyncException.h

00001  /*
00002  * Copyright (C) 2006-2007 Funambol, Inc.
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 version 2 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00016  * 02111-1307  USA
00017 */
00018 
00019 #ifndef INCL_SYNC_EXC
00020 #define INCL_SYNC_EXC
00021 
00026 #include "base/fscapi.h"
00027 #include "base/errors.h"
00028 #include <string>
00029 
00030 
00036 class SyncException {
00037 
00038 private:
00039 
00041     static SyncException* pinstance;
00042 
00043 
00045     char*  errorMsg;
00047     WCHAR* werrorMsg;
00048 
00050     DWORD errorCode;
00051 
00052 protected:
00053 
00055     SyncException();
00056 
00057 
00058 public:
00059 
00061     static SyncException* getInstance();
00062     
00064     ~SyncException();
00065 
00067     void setExceptionData(const char* msg, DWORD code = NULL);
00068 
00070     void clear();
00071 
00073     const char*         getErrorMsg();
00074     const WCHAR*        wgetErrorMsg();
00075     const std::wstring  wstrgetErrorMsg();
00076     _declspec(dllexport) DWORD getErrorCode();
00077 };
00078 
00079 
00080 // ---------- Static functions -----------
00081 
00083 void throwSyncException(const char* msg, DWORD code = NULL);
00084 
00085 
00088 #endif

Generated on Fri Nov 9 12:21:26 2007 for Funambol Outlook Plug-in Library by  doxygen 1.5.2