D:/develop/v65/clients/outlook/install/output/export/funambol/clients/outlook/mainclientDll/src/include/outlook/utils.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_UTILS_OL
00020 #define INCL_UTILS_OL
00021 
00027 // Timezones that are changing their rule in 2007
00028 #define TZ_EASTERN_US           TEXT("Eastern Standard Time" )
00029 #define TZ_CENTRAL_US           TEXT("Central Standard Time" )
00030 #define TZ_MOUNTAIN             TEXT("Mountain Standard Time")
00031 #define TZ_PACIFIC_US           TEXT("Pacific Standard Time" )
00032 #define TZ_ALASKA               TEXT("Alaska Standard Time"  )
00033 
00034 
00035 #include "base/fscapi.h"
00036 #include "outlook/defs.h"
00037 #include "winmaincpp.h"
00038 
00039 #include <string>
00040 
00041 
00042 // Item types conversions.
00043 const OlDefaultFolders  getDefaultFolderType (const std::wstring& itemType);
00044 const OlItemType        getOlItemType        (const std::wstring& itemType);
00045 const std::wstring      getItemTypeFromOlType(const OlItemType olType);
00046 
00047 void manageComErrors(_com_error &e);
00048 const std::wstring getNameFromVersion(std::wstring version);
00049 
00050 
00051 // DATE/TIME conversions.
00052 void doubleToSystemTime(std::wstring& systemDate, const DATE doubleDate, const BOOL toUTC, const bool onlyDate = false);
00053 void systemTimeToDouble(const std::wstring& dataString, DATE* date, bool onlyDate = false);
00054 void localTimeToUTC    (SYSTEMTIME &sysTime);
00055 void UTCToLocalTime    (SYSTEMTIME &sysTime);
00056 bool adjustDSTSettings (TIME_ZONE_INFORMATION* timeZoneInfo, SYSTEMTIME targetTime);
00057 bool isTZForDSTChange  (const std::wstring& tzName);
00058 
00059 
00060 // Boolean conversions.
00061 BOOL         vBoolToBOOL(VARIANT_BOOL vbool);
00062 bool         vBoolToBool(VARIANT_BOOL vbool);
00063 VARIANT_BOOL BOOLToVBool(BOOL b);
00064 
00065 
00068 #endif

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