SmsBtMapCSrvStorage.h 17.3 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2005
*
*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
*
*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/

/*****************************************************************************
 *
 * Filename:
 * ---------
 *  SmsBtMapCSrvStorage.h
 *
 * Project:
 * --------
 *  MAUI
 *
 * Description:
 * ------------
 *  SMS Service For BT File
 *
 * Author:
 * -------
 * -------
 *
 *============================================================================
 *             HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 * removed!
 * removed!
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *============================================================================
 *****************************************************************************/
#ifndef __SRV_SMS_BTMAP_STORAGE_SRV_H__
#define __SRV_SMS_BTMAP_STORAGE_SRV_H__
#include "MMI_features.h"
#include "MapSrvGprot.h"
#include "SmsBtMapCSrvProt.h"
#include "SmsBtMapCSrvGprot.h"
#include "SmsBtMapCSrvUtil.h"
#include "mmi_frm_mem_gprot.h"
#include "app_datetime.h"


#define SRV_SMS_BTMAPC_INVALID_PDU_ID                  0xFFFF       
#define SRV_SMS_BTMAPC_INVALID_INDEX                   0xFFFF       
#define SRV_SMS_BTMAPC_ACTION_INVALID_ID               0xFFFF

typedef U16 SMS_BTMAPC_CHECKSUM;

#define SRV_SMS_BTMAPC_MAX_SEGMENT               (4)
#define SRV_SMS_BTMAPC_CHAR_PER_SEGMENT          (160)
#define SRV_SMS_BTMAPC_MAX_CONTENT_SIZE          SRV_SMS_BTMAPC_CHAR_PER_SEGMENT * SRV_SMS_BTMAPC_MAX_SEGMENT
#define SRV_SMS_BTMAPC_DISPLAY_CHAR_SIZE         (511)
#define SRV_SMS_BTMAPC_DISPLAY_BUFFER_SIZE       (1024)

#define SRV_SMS_BTMAPC_MAX_FILE_SUPPORT          (4)
#define SRV_SMS_BTMAPC_MAX_FOLDER_LEN            40
#define SRV_SMS_BTMAPC_ORIGINAL_FILE_EXT_NAME      ".o" 
#define SRV_SMS_BTMAPC_BACKUP_FILE_EXT_NAME      ".bak" 
#define SRV_SMS_BTMAPC_SERVICE_FOLDER_NAME      "\\@SMSBTMAPCSRV\\" 
#define SRV_SMS_BTMAPC_MSG_BTMAPC_NODE_NAME      "msg_btmapc_node" 
#define SRV_SMS_BTMAPC_MSG_BTMAPC_CNTX_NAME      "msg_btmapc_cntx" 
#define SRV_SMS_BTMAPC_MAX_PATH_LEN      (SRV_SMS_BTMAPC_MAX_FOLDER_LEN + 1)

typedef enum
{
    SRV_SMS_NODE_NONE       = 0x00,
    /* If set this flag, the PDU node is invalid */
    SRV_SMS_NODE_INVALID    = 0x01,
    /* If set this flag, the PDU node is used */
    SRV_SMS_NODE_USED       = 0x02,
    /* If set this flag, the prev_index of the PDU node is pointed to a node of msg list */
    SRV_SMS_NODE_FIRST      = 0x04,
    /* If set this flag, this PDU only can be read */
    SRV_SMS_NODE_READING    = 0x08,
    /* If set this flag, this PDU only can be updated */
    SRV_SMS_NODE_UPDATING   = 0x10,
    /* If set this flag, this PDU only can be deleted */
    SRV_SMS_NODE_DELETING   = 0x20,
    /* If set this flag, this PDU can't be read/Updated/Deleted */
    SRV_SMS_NODE_LOCKING    = 0x40
} srv_sms_btmapc_node_flag_enum;

typedef enum
{
    SRV_SMS_BTMAPC_FILE_INDEX_NONE = 0, /* none */
    SRV_SMS_BTMAPC_FILE_CNTX_INFO, /*sms base info for msg list*/
    SRV_SMS_BTMAPC_FILE_INDEX_SMS_INFO, /*sms base info for msg list*/
    SRV_SMS_BTMAPC_FILE_INDEX_SMS_PDU_INDEX,/*pdu list*/
    SRV_SMS_BTMAPC_FILE_INDEX_SMS_ADDR_INFO,/*addr list*/
    SRV_SMS_BTMAPC_FILE_INDEX_SMS_PDU,/*sms pdu*/
    SRV_SMS_BTMAPC_FILE_INDEX_SMS_HD_INDEX,
    SRV_SMS_BTMAPC_FILE_INDEX_TOTAL 
} srv_sms_btmapc_file_index_enum;

typedef enum
{
    SRV_SMS_BTMAPC_OP_FS_SUCC = 0, /* none */
    SRV_SMS_BTMAPC_OP_INVALID_PARA = -1, /* the para is invalid, such, the buff is NULL, the record id is invalid*/
    SRV_SMS_BTMAPC_OP_NOT_AVAILABLE = -2,/*the app init is error, not finish*/
    SRV_SMS_BTMAPC_OP_INVALID_CONTENT = -3,/*the content size is not equ the size expect*/
    SRV_SMS_BTMAPC_OP_MEM_INSUFFICIENT = -4,/*there is no handle*/
    SRV_SMS_BTMAPC_OP_FS_ERROR = -5

} srv_sms_btmapc_op_result_enum;


typedef struct
{
    MMI_BOOL is_download;
    U16 msg_id;
    U8 msg_handle[(SRV_BT_MAP_MAX_HANDLE_STR_LEN + 1) * 2];
}srv_sms_btmapc_msg_index_struct;


typedef struct
{
    srv_sms_btmapc_file_index_enum file_index;         /* where to backup or restore the sms */
    U32 start_record_id;
    U32 record_num;
} srv_sms_btmapc_op_struct;



typedef struct
{
    U32 file_index;                  
    U32 record_size;                           
    U32 record_number;              
} srv_sms_btmapc_file_entry_struct;


typedef struct
{
    SRV_SMS_HANDLE_HEADER
}srv_sms_btmapc_action_struct;


typedef struct
{
    SRV_SMS_HANDLE_HEADER
    srv_sms_btmapc_box_enum curr_box_type;
}srv_sms_btmapc_change_folder_struct;

typedef struct
{
    U8 segment;
    U8 type;
    U8 read_count;
    U8 status;
    U16 prev_pdu_id;
    U16 next_pdu_id;
} srv_sms_btmapc_pdu_node_struct;

typedef struct
{
    MMI_BOOL is_ready;
    U16 total_msg_num;
    U16 unused_msg_head_id;
    U16 used_msg_tail_id;
    S32 hd;
    srv_sms_btmapc_box_enum curr_box;
    srv_sms_action_enum curr_action;
} sms_btmapc_storage_manager_cntx_struct;

typedef struct
{
    srv_sms_status_enum status;
    srv_sms_storage_enum storage_type;
    MMI_BOOL is_hidden;
    MMI_BOOL is_search_concat;
    U8 raw_data_size;
    srv_sms_sim_enum sim_id;
    U16 msg_id;
    U8* pdu_raw_data;
    smslib_general_struct* decode_data;
} srv_sms_btmapc_msg_add_pdu_struct;

typedef struct
{
    SRV_SMS_HANDLE_HEADER
    srv_sms_btmapc_spdu_struct *spdu_list[SRV_SMS_MAX_SEG];
    U16 pdu_id_list[SRV_SMS_MAX_SEG];
    U8 msg_ref[SRV_SMS_MAX_SEG];
    U16 report_id;
    U8 total_pdu;
    U8 curr_index;
    srv_sms_storage_enum storage_type;
    srv_sms_sim_enum sim_id;
    srv_sms_cause_enum error_cause;
    srv_sms_btmapc_msg_node_struct msg_node;
} srv_sms_btmapc_save_cntx_struct;

typedef struct
{
    SRV_SMS_HANDLE_HEADER
    U16 msg_id;
    SMS_HANDLE save_handle;
    srv_sms_para_enum update_flag;

    U8 curr_index;
    U8 total_pdu;
    U16 pdu_id_list[SRV_SMS_MAX_SEG];
    srv_sms_btmapc_spdu_struct *ori_spdu[SRV_SMS_MAX_SEG];
    srv_sms_cause_enum error_cause;
} srv_sms_btmapc_update_cntx_struct;

typedef struct
{
    SRV_SMS_HANDLE_HEADER
    U16 pdu_id_list[SRV_SMS_MAX_SEG];
    U8 total_pdu;
    U8 curr_index;
    S8 content[(SRV_SMS_MSG_INFO_CONTENT_LEN + 1) * ENCODING_LENGTH];
    U16 content_len;
} srv_sms_btmapc_get_content_cntx_struct;

typedef struct
{
    U8 total_segment;
    srv_sms_status_enum status;
    srv_sms_storage_enum storage_type;
    srv_sms_sim_enum sim_id;
    MYTIME time_stamp;
    U8 **spdu_array;
} srv_sms_btmapc_msg_data_pdu_struct;


typedef struct
{
    U16 pdu_id_list[SRV_SMS_MAX_SEG];
    U8 total_pdu;
    U8 curr_index;
    U16 msg_id;
    srv_sms_btmapc_msg_data_pdu_struct *msg_data;
    SrvSmsCallbackFunc callback_func;
    void *user_data;
} srv_sms_btmapc_read_msg_pdu_cntx_struct;


typedef struct
{
    srv_sms_para_enum update_flag;
    srv_sms_btmapc_spdu_struct* spdu_data;
} srv_sms_btmapc_update_pdu_struct;

typedef struct
{
    SRV_SMS_HANDLE_HEADER
    U8 *msg_bitmap;
    U8 *deleted_msg_bitmap;
    U16 bitmap_size;
    U16 deleted_num;
    U16 curr_msg_id;
} srv_sms_btmapc_delete_bitmap_cntx_struct;

typedef struct
{
    U16 pdu_id;
    SrvSmsCallbackFunc callback_func;
    void *user_data;
} srv_sms_btmapc_msg_update_pdu_cntx_struct;

typedef struct
{
    srv_sms_storage_enum storage_type;
    U8 curr_seg;
    srv_sms_btmapc_spdu_struct* spdu_data;
} srv_sms_btmapc_add_pdu_struct;

typedef struct
{
    U16 msg_id;
    SrvSmsCallbackFunc callback_func;
    void *user_data;
} srv_sms_btmapc_msg_delete_pdu_cntx_struct;


typedef struct
{
    srv_sms_btmapc_spdu_struct *spdu_data;
} srv_sms_btmapc_read_pdu_cb_struct;

typedef struct
{
    srv_sms_btmapc_msg_data_pdu_struct *msg_data;
} srv_sms_btmapc_read_msg_pdu_cb_struct;

typedef struct
{
    U16 msg_id;
    U16 pdu_id;
} srv_sms_btmapc_msg_add_pdu_cb_struct;

typedef struct
{
    U16 pdu_id;
    SrvSmsCallbackFunc callback_func;
    void *user_data;
} srv_sms_btmapc_delete_pdu_cntx_struct;

typedef struct
{
    srv_sms_btmapc_msg_node_struct msg_node;
    U8 curr_seg;
    U16 msg_id;
    MMI_BOOL is_hiden;
    MMI_BOOL is_search_concat;
    SrvSmsCallbackFunc callback_func;
    void *user_data;
} srv_sms_btmapc_msg_add_pdu_cntx_struct;

typedef struct
{
    U8 curr_seg;
    U16 pdu_id;
} srv_sms_btmapc_add_pdu_cb_struct;

typedef struct
{
    void *dummy;
} srv_sms_btmapc_msg_delete_pdu_cb_struct;

typedef struct
{
#ifdef __SRV_SMS_DELIVERY_STATUS__
    U8 msg_ref;
    srv_sms_sr_status_enum tp_st;
#endif /* __SRV_SMS_DELIVERY_STATUS__ */
    U8 curr_seg;
    srv_sms_status_enum new_status;
    U16 pdu_id;
    srv_sms_para_enum update_flag;
    SrvSmsCallbackFunc callback_func;
    void *user_data;
} srv_sms_btmapc_update_pdu_cntx_struct;


typedef struct
{
    void *dummy;
} srv_sms_btmapc_msg_update_pdu_cb_struct;


typedef struct
{
    U8 curr_seg;
    srv_sms_status_enum new_status;
    U16 pdu_id;
    srv_sms_para_enum update_flag;
    SrvSmsCallbackFunc callback_func;
    void *user_data;
} srv_sms_btmapc_delete_pdu_cb_struct;

typedef struct
{
    void *dummy;
} srv_sms_btmapc_update_pdu_cb_struct;

typedef struct
{
    U16 pdu_id;
    SrvSmsCallbackFunc callback_func;
    void *user_data;
} srv_sms_btmapc_add_pdu_cntx_struct;

typedef struct
{
    U16 msg_id;
    srv_sms_msg_data_struct *msg_data;  
} srv_sms_btmapc_get_msg_cb_struct;


typedef struct
{
    char msg_handle[SRV_BT_MAP_MAX_HANDLE_STR_LEN];
    srv_sms_btmapc_ind_enum evt_report_type;
    srv_sms_btmapc_box_enum box_type;
} srv_sms_btmapc_node_event_struct;


extern srv_sms_btmapc_msg_node_struct srv_sms_btmapc_msg_list[SRV_SMS_BTMAPC_MAX_SMS_ENTRY];
extern srv_sms_btmapc_pdu_node_struct srv_sms_btmapc_pdu_list[SRV_SMS_BTMAPC_MAX_SMS_ENTRY];
extern U8 srv_sms_btmapc_pdu_detail[SRV_SMS_BTMAPC_MAX_SMS_ENTRY][SRV_SMS_BTMAPC_MAX_SPDU_SIZE];

extern srv_sms_btmapc_msg_index_struct srv_sms_btmapc_handle_list[SRV_SMS_BTMAPC_MAX_SMS_ENTRY];
extern sms_btmapc_storage_manager_cntx_struct sms_btmapc_storage_cntx;

extern srv_sms_btmapc_file_entry_struct sms_btmapc_file_mgr_common_table[SRV_SMS_BTMAPC_MAX_FILE_SUPPORT];

extern void srv_sms_btmapc_storage_init_data(void);
extern void srv_sms_btmapc_storage_save_data(void);
void srv_sms_btmapc_list_init(void);
U16 srv_sms_btmapc_get_unread_sms_num(void);
U16 srv_sms_btmapc_get_msg_id(srv_sms_btmapc_box_enum msg_box_type, U16 list_index);
U16 srv_sms_btmapc_get_list_size(srv_sms_btmapc_box_enum msg_box_type);
srv_sms_btmapc_box_enum srv_sms_btmapc_get_list_type(
                    srv_sms_status_enum status,
                    srv_sms_storage_enum storage_type,
                    srv_sms_folder_enum folder_id);

U16 srv_sms_btmapc_get_msg_list_index(srv_sms_btmapc_box_enum* msg_box_type, U16 msg_id);
void srv_sms_btmapc_delete_msg_list(
        srv_sms_btmapc_box_enum msg_box_type,
        srv_sms_sim_enum sim_id,
        SrvSmsCallbackFunc callback_func,
        void* user_data);
srv_sms_cause_enum srv_sms_btmapc_read_msg_init(
                            srv_sms_btmapc_read_cntx_struct* read_cntx,
                            U16 msg_id,
                            MMI_BOOL change_status,
                            srv_sms_msg_data_struct* msg_data);
srv_sms_cause_enum srv_sms_btmapc_change_msg_status_init(
                            srv_sms_btmapc_change_status_cntx_struct* change_cntx,
                            U16 msg_id,
                            srv_sms_status_enum status);
srv_sms_cause_enum srv_sms_btmapc_delete_msg_init(
                            srv_sms_btmapc_delete_cntx_struct* read_cntx,
                            U16 msg_id,
                            MMI_BOOL is_background);
srv_sms_cause_enum srv_sms_btmapc_check_common_msg_error(U16 msg_id, srv_sms_action_enum action);
srv_sms_btmapc_msg_node_struct* srv_sms_btmapc_get_msg_node(U16 msg_id);
U8* srv_sms_btmapc_get_msg_handle(U16 msgid);
SMS_HANDLE srv_sms_btmapc_read_msg_detail(
                U16 msg_id,
                MMI_BOOL change_status,
                void* msg_data, 
                void *user_data);
SMS_HANDLE srv_sms_btmapc_delete_msg_detail(
                        U16 msg_id,
                        MMI_BOOL is_backgroud,
                        srv_sms_btmapc_delete_cntx_struct *delete_cntx);
MMI_BOOL srv_sms_btmapc_add_msg_into_list(
            U16 *msg_id_list,
            U16 curr_num,
            U16 max_num,
            U16 add_msg_id,
            srv_sms_sort_enum sort_flag,
            srv_sms_order_enum order_flag);
MMI_BOOL srv_sms_btmapc_delete_msg_from_list(
            U16 *msg_id_list,
            U16 msg_num,
            U16 del_msg_id);
U16 srv_sms_btmapc_query_msg_int(
        srv_sms_query_struct *query_data,
        U16* msg_list,
        U16 list_size);
void srv_sms_btmapc_send_msg_callback(SMS_HANDLE sms_handle, MMI_BOOL result, srv_sms_cause_enum cause);
SMS_HANDLE srv_sms_btmapc_change_msg_status_detail(
                U16 msg_id,
                srv_sms_status_enum status,
                srv_sms_btmapc_change_status_cntx_struct *change_cntx);

MMI_BOOL srv_sms_btmapc_is_msg_download(U16 msg_id);
U16 srv_sms_btmapc_add_msg_node(srv_sms_btmapc_msg_node_struct *msg_node);
U16 srv_sms_btmapc_get_msg_id_by_handle(U8 *handle);
void srv_sms_btmapc_str_to_utctime(applib_time_struct * utc_time, const char * str);

MMI_BOOL srv_sms_btmapc_check_msg_op_conflict(U16 msg_id, srv_sms_action_enum action);
void srv_sms_btmapc_update_msg_status(U16 msg_id);
void srv_sms_btmapc_get_msg_info(srv_sms_msg_info_struct* msg_info, U16 msg_id);
void srv_sms_btmapc_update_msg_node(
        U16 msg_id,
        srv_sms_btmapc_msg_node_struct *msg_node,
        U8 curr_seg);
void srv_sms_btmapc_delete_msg_node(U16 msg_id);
void srv_sms_btmapc_set_msg_download(U16 msg_id, MMI_BOOL is_download);
void srv_sms_btmapc_clear_msg_download(U16 msg_id);
extern void srv_sms_btmapc_read_me_sms(
          U16 msg_id, 
        SrvSmsCallbackFunc callback_func,
        void *user_data);
extern void srv_sms_btmapc_write_me_sms(
            U16 msg_id,
            CHAR *content,
        SrvSmsCallbackFunc callback_func,
        void *user_data);
extern void srv_sms_btmapc_get_msg_name(
                U16 msg_id,
                MMI_BOOL is_backup,
                WCHAR* ucs2_buff);
extern void srv_sms_btmapc_get_file_name(
                srv_sms_btmapc_file_index_enum file_index,
                MMI_BOOL is_backup,
                WCHAR* ucs2_buff);
extern void srv_sms_btmapc_get_root_name(WCHAR* ucs2_buff);
extern MMI_BOOL custom_sms_btmapc_using_card_memory(void);
extern void srv_sms_btmapc_list_reset_folder(void);
extern void srv_sms_btmapc_set_msg_size(U16 msg_id, U32 msg_size, U32 real_size);
extern void srv_sms_btmapc_set_curr_op(srv_sms_action_enum action);
extern srv_sms_action_enum srv_sms_btmapc_get_curr_op();
extern MMI_BOOL srv_sms_btmapc_is_msg_local(U16 msg_id);
#endif /* __SRV_SMS_BTMAP_STORAGE_SRV_H__ */