4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@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.
21 #ifndef __TCORE_CO_SMS_H__
22 #define __TCORE_CO_SMS_H__
24 #include <core_object.h>
29 #define nDefaultSMSPWithoutAlphaId 28
31 #define SMSPValidDestAddr 0x01
32 #define SMSPValidSvcAddr 0x02
33 #define SMSPValidPID 0x04
34 #define SMSPValidDCS 0x08
35 #define SMSPValidVP 0x10
37 #define nDestAddrOffset 1
38 #define nSCAAddrOffset 13
43 struct property_sms_info {
48 struct tcore_sms_operations {
49 TReturn (*send_umts_msg)(CoreObject *o, UserRequest *ur);
50 TReturn (*read_msg)(CoreObject *o, UserRequest *ur);
51 TReturn (*save_msg)(CoreObject *o, UserRequest *ur);
52 TReturn (*delete_msg)(CoreObject *o, UserRequest *ur);
53 TReturn (*get_storedMsgCnt)(CoreObject *o, UserRequest *ur);
54 TReturn (*get_sca)(CoreObject *o, UserRequest *ur);
55 TReturn (*set_sca)(CoreObject *o, UserRequest *ur);
56 TReturn (*get_cb_config)(CoreObject *o, UserRequest *ur);
57 TReturn (*set_cb_config)(CoreObject *o, UserRequest *ur);
58 TReturn (*set_mem_status)(CoreObject *o, UserRequest *ur);
59 TReturn (*get_pref_brearer)(CoreObject *o, UserRequest *ur);
60 TReturn (*set_pref_brearer)(CoreObject *o, UserRequest *ur);
61 TReturn (*set_delivery_report)(CoreObject *o, UserRequest *ur);
62 TReturn (*set_msg_status)(CoreObject *o, UserRequest *ur);
63 TReturn (*get_sms_params)(CoreObject *o, UserRequest *ur);
64 TReturn (*set_sms_params)(CoreObject *o, UserRequest *ur);
65 TReturn (*get_paramcnt)(CoreObject *o, UserRequest *ur);
66 TReturn (*send_cdma_msg)(CoreObject *o, UserRequest *ur);
70 int _tcore_util_sms_encode_smsParameters(const struct telephony_sms_Params *incoming, unsigned char *data, int SMSPRecordLen);
71 gboolean tcore_sms_get_ready_status(CoreObject *o);
72 gboolean tcore_sms_set_ready_status(CoreObject *o, int status);
73 CoreObject* tcore_sms_new(TcorePlugin *p, const char *name, struct tcore_sms_operations *ops, TcoreHal *hal);
74 void tcore_sms_free(CoreObject * n);