2 * Funambol is a mobile platform developed by Funambol, Inc.
3 * Copyright (C) 2003 - 2007 Funambol, Inc.
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Affero General Public License version 3 as published by
7 * the Free Software Foundation with the addition of the following permission
8 * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED
9 * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE
10 * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program; if not, see http://www.gnu.org/licenses or write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite
23 * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com.
25 * The interactive user interfaces in modified source and object code versions
26 * of this program must display Appropriate Legal Notices, as required under
27 * Section 5 of the GNU Affero General Public License version 3.
29 * In accordance with Section 7(b) of the GNU Affero General Public License
30 * version 3, these Appropriate Legal Notices must retain the display of the
31 * "Powered by Funambol" logo. If the display of the logo is not reasonably
32 * feasible for technical reasons, the Appropriate Legal Notices must display
33 * the words "Powered by Funambol".
38 // @author Stefano Fornari @ Funambol
39 // @version $Id: vCardProperty.h,v 1.8 2008-04-11 08:17:13 marco_garatti Exp $
43 #ifndef INCL_PIM_PROPERTY
44 #define INCL_PIM_PROPERTY
47 #include "base/fscapi.h"
48 #include "base/globalsdef.h"
53 * This object represents a property for VCard and ICalendar object
54 * (i.e. its value and its parameters)
58 // ------------------------------------------------------------ Private data
67 * Sets internal members releasing the currently allocated memory (if
68 * any was allocate). The passed value is duplicated so that the caller
69 * can independently release it.
71 * @param property the address of the pointer to set to the new
73 * @param v the value to set into the property
75 void set(WCHAR** property, WCHAR* v);
77 // -------------------------------------------- Constructors and Destructors
80 * Creates property without parameters but with the specified value
82 vCardProperty (WCHAR* v = NULL);
86 // ---------------------------------------------------------- Public methods
89 * Returns the encoding parameter of this property
91 * @param buf if not NULL, the value is copied in this buffer
92 * @param size buffer size
94 * @return the encoding parameter of this property
96 WCHAR* getEncoding (WCHAR* buf = NULL, int size = -1);
99 * Returns the language parameter of this property
101 * @param buf if not NULL, the value is copied in this buffer
102 * @param size buffer size
104 * @return the language parameter of this property
106 WCHAR* getLanguage (WCHAR* buf = NULL, int size = -1);
109 * Returns the value parameter of this property
111 * @param buf if not NULL, the value is copied in this buffer
112 * @param size buffer size
114 * @return the value parameter of this property
116 WCHAR* getValue (WCHAR* buf = NULL, int size = -1);
119 * Returns the charset parameter of this property
121 * @param buf if not NULL, the value is copied in this buffer
122 * @param size buffer size
124 * @return the charset parameter of this property
126 WCHAR* getCharset (WCHAR* buf = NULL, int size = -1);
129 * Sets the encoding parameter of this property
131 * @param encoding the encoding to set
133 void setEncoding (WCHAR* encoding);
136 * Sets the language parameter of this property
138 * @param language the language to set
140 void setLanguage (WCHAR* language);
143 * Sets the value parameter of this property
145 * @param value the value to set
147 void setValue (WCHAR* value);
150 * Sets the charset parameter of this property
152 * @param chrset the charset to set
154 void setCharset (WCHAR* chrset);
158 * Creates and returns a new Property object. The object is created with
159 * the C++ new operator and must be deallocated with the delete C++
162 vCardProperty* clone();