2 * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __NOTIFICATION_TEXT_DOMAIN_H__
18 #define __NOTIFICATION_TEXT_DOMAIN_H__
25 * @brief Sets the text domain to localize the notification.
26 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
27 * @param[in] noti The notification handle
28 * @param[in] domain The text domain
29 * @param[in] dir The text dir
30 * @return #NOTIFICATION_ERROR_NONE on success,
31 * otherwise any other value on failure
32 * @retval #NOTIFICATION_ERROR_NONE Success
33 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
36 #include <notification.h>
39 notification_h noti = NULL;
40 int noti_err = NOTIFICATION_ERROR_NONE;
42 noti = notification_create(NOTIFICATION_TYPE_NOTI);
47 noti_err = notification_set_text_domain(noti, PACKAGE, LOCALEDIR);
48 if(noti_err != NOTIFICATION_ERROR_NONE) {
49 notification_free(noti);
55 int notification_set_text_domain(notification_h noti,
60 * @brief Gets the text domain from the notification handle.
61 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
62 * @remarks Do not free returned domain and dir. They are freed when notification_free() or notification_free_list() is called.
63 * @param[in] noti The notification handle
64 * @param[out] domain The domain
65 * @param[out] dir The locale dir
66 * @return #NOTIFICATION_ERROR_NONE on success,
67 * otherwise any other value on failure
68 * @retval #NOTIFICATION_ERROR_NONE Success
69 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
72 #include <notification.h>
75 notification_h noti = NULL;
76 int noti_err = NOTIFICATION_ERROR_NONE;
80 noti_err = notification_get_text_domain(noti, &domain, &dir);
81 if(noti_err != NOTIFICATION_ERROR_NONE) {
87 int notification_get_text_domain(notification_h noti,
93 #endif /* __cplusplus */
94 #endif /* __NOTIFICATION_TEXT_DOMAIN_H__ */