Update change log and spec for wrt-plugins-tizen_0.2.73
[profile/ivi/wrt-plugins-tizen.git] / src / platform / Tizen / Messaging / EmailUtils.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License. 
15 */
16
17 /**
18  * @author          Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
19  */
20
21 #ifndef TIZEN_MESSAGING_EMAILUTILS_H_
22 #define TIZEN_MESSAGING_EMAILUTILS_H_
23
24 #include <string>
25
26 #include <API/Messaging/Recipient.h>
27
28 namespace TizenApis {
29 namespace Platform {
30 namespace Messaging {
31
32 namespace EmailUtils {
33 /**
34  * Formats address as: "Name" <address>.
35  * @param address E-mail address.
36  * @param name Name, omitted if empty.
37  * @return Formatted address.
38  */
39 std::string formatAddress(const std::string& address,
40         const std::string& name = std::string());
41
42 /**
43  * Formats multiple addresses as: "Name1" <address1>;"Name2" <address2>...
44  * @param recipients Recipients to build address line from.
45  * @return Formatted addresses.
46  */
47 std::string formatAddressLine(const Api::Messaging::Recipients& recipients);
48
49 /**
50  * Extracts bare e-mail address.
51  * @param address Address to strip.
52  * @return E-mail address.
53  */
54 std::string stripAddress(const std::string& address);
55
56 /**
57  * Extracts recipients bare e-mail addresses.
58  * @param addressLine Address line to split and strip.
59  * @return Recipients.
60  */
61 Api::Messaging::Recipients stripAddressLine(const std::string& addressLine);
62 }
63 }
64 }
65 }
66 #endif