src/include/windows/vocl/wincontactsif.h

00001  /*
00002  * Copyright (C) 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_WINCONTACT_SIF
00020 #define INCL_WINCONTACT_SIF
00021 
00026 #include "vocl/VObject.h"
00027 #include "vocl/WinItem.h"
00028 #include "vocl/WinContact.h"
00029 
00030 using namespace std;
00031 
00032 
00038 class WinContactSIF : public WinContact {
00039 
00040 private:
00041 
00043     wstring sif;
00044     const wchar_t** sifFields;
00045    
00046 public:
00047 
00049     WinContactSIF();
00051     WinContactSIF(const wstring dataString, const wchar_t **fields);
00052 
00054     ~WinContactSIF();   
00055     
00063     int parse(const wstring dataString);
00064    
00071     wstring toString();     
00072 
00084     wstring adaptToSpecsSIF(const wstring& propName, const wstring& propValue, const wstring& type);
00085 
00086 
00090     void addPropertyToSIF(const wstring propertyName, wstring propertyValue);
00091 
00095     void PropertyValue into 'sif' string.">addPhotoToSIF(wstring propertyValue);
00096 
00097     /*
00098     * Trim the string
00099     */
00100     wstring trim(const wstring& str);
00101 
00102     /*
00103     * Format a date like yyyyMMdd in yyyy-MM-dd
00104     */
00105     wstring formatDateWithMinus(const wstring& stringDate);
00106 
00117     wstring adaptToSIFSpecs(const wstring& propName, const wstring& propValue);
00118     
00119 };
00122 #endif

Generated on Tue Oct 30 15:11:27 2007 for Funambol C++ Client Library by  doxygen 1.5.2