4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
25 * This file defines all APIs of EMN.
26 * @file email-daemon-emn.h
27 * @author Kyuho Jo(kyuho.jo@samsung.com)
29 * @brief This file is the header file of EMN library.
32 #ifndef __EMAIL_DAEMON_EMN_H__
33 #define __EMAIL_DAEMON_EMN_H__
36 * @ingroup EMAIL_SERVICE
41 #include "email-internal-types.h"
46 #endif /* __cplusplus */
54 /* Error Values for the Email options */
57 EMAIL_OPTION_ERROR_NONE = 0,
58 EMAIL_OPTION_ERROR_INVALID_PARAM,
59 EMAIL_OPTION_ERROR_STORAGE,
62 /* Manual Network value */
63 #define EMAIL_OPTION_NETWORK_MANUAL 1
66 /* Enums for the Gcong Option Key */
69 EMAIL_OPTION_KEY_HOME_NETWORK = 0,
70 EMAIL_OPTION_KEY_ROAMING_NETWORK,
74 int emdaemon_initialize_emn(void);
75 int emdaemon_finalize_emn(int bExtDest);
78 * This callback specifies the callback of retrieving the result that is downloaded new messages.
80 * @param[in] mail_count Specifies count of new mail.
81 * @param[in] user_data Specifies the user data.
82 * @param[in] err_code Specifies the error code.
84 * @return This function returns true on success or false on failure.
86 typedef int (*email_emn_noti_cb)(
95 * @param[in] wbxml_b64 Specifies the encoded string
96 * @param[in] callback Specifies the callback function for retrieving the result that is downloaded new mail.
97 * @param[out] err_code Specifies the error code returned.
99 * @return This function returns true on success or false on failure.
101 INTERNAL_FUNC int emdaemon_handle_emn_notification(unsigned char* wbxml_b64, email_emn_noti_cb callback, int* err_code);
106 #endif /* __cplusplus */
113 #endif /* __EMAIL_DAEMON_EMN_H__ */