Merge "Fix build warning based on GCC-9" into tizen
[platform/core/api/notification.git] / notification-ex / multi_language.h
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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 #ifndef NOTIFICATION_EX_MULTI_LANGUAGE_H_
18 #define NOTIFICATION_EX_MULTI_LANGUAGE_H_
19
20 #include <string>
21 #include <memory>
22 #include <vector>
23
24 #include <bundle_cpp.h>
25
26 #ifndef EXPORT_API
27 #define EXPORT_API __attribute__((visibility("default")))
28 #endif
29
30 namespace notification {
31 namespace item {
32
33 /**
34  * @brief The class for MultiLanguage type notification.
35  * @details The class to make the notification with multi language.
36  * @since_tizen 5.5
37  */
38 class EXPORT_API MultiLanguage {
39  public:
40   MultiLanguage(std::string msgid, std::string format,
41       std::vector<std::string> args);
42   MultiLanguage(std::string serialized);
43   virtual ~MultiLanguage();
44   tizen_base::Bundle Serialize() const;
45   void Deserialize(tizen_base::Bundle b);
46   void UpdateString(std::string domain, std::string locale_directory);
47   void UpdateString();
48   std::string GetTranslatedString();
49
50  private:
51   class Impl;
52   std::unique_ptr<Impl> impl_;
53 };  // class MultiLanguage
54
55 }  // namespace item
56 }  // namespace notification
57
58 #endif  // NOTIFICATION_EX_MULTI_LANGUAGE_H_