SyncSrvGprot.h 19.8 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 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759
/*****************************************************************************
*  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:
 * ---------
 *  SyncSrvGprot.h
 *
 * Project:
 * --------
 *  MAUI
 *
 * Description:
 * ------------
 *  Published interface of sync service
 *
 * 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!
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *============================================================================
 ****************************************************************************/
#ifndef __SYNC_SRV_GPROT_H__
#define __SYNC_SRV_GPROT_H__

#ifdef __cplusplus
extern "C"
{
#endif

/****************************************************************************
 * Include
 ****************************************************************************/
#include "MMI_features.h"
#include "MMIDataType.h"

/****************************************************************************
 * Define
 ****************************************************************************/
#define SRV_SYNC_OK                  200
#define SRV_SYNC_NOT_FOUND           211          /* Wen, */
#define SRV_SYNC_FAIL                500
#define SRV_SYNC_INVALID_CREDENTIAL  401
#define SRV_SYNC_MISSING_CREDENTIAL  407
#define SRV_SYNC_DEVICE_FULL         420
#define SRV_SYNC_PAYMENT_REQUIRED    402

/* yln added, other code need to be displayed */
#define SRV_SYNC_CODE_FORBIDDEN      403          /* Server busy */
#define SRV_SYNC_INCOMPLETE_CMD      412
#define SRV_SYNC_DEVICE_FULL         420
#define SRV_SYNC_SERVICE_UNAVAILABLE 503          /* Server busy */
#define SRV_SYNC_DATASTORE_FAIL      510
#define SRV_SYNC_SVR_FAIL            511
#define SRV_SYNC_ERR_OCCUR           512
#define SRV_SYNC_PROTOCOL_UNSUPPORT  513

/* account valid mask  */
#define MMI_SYNCML_ACCOUNT_VALID_MASK_NAME  0x0001
#define MMI_SYNCML_ACCOUNT_VALID_MASK_SVR   0x0002
#define MMI_SYNCML_ACCOUNT_VALID_MASK_CON   0x0004  /* phonebook validation mask */
#define MMI_SYNCML_ACCOUNT_VALID_MASK_CAL   0x0008
#define MMI_SYNCML_ACCOUNT_VALID_MASK_TASK  0x0010
#define MMI_SYNCML_ACCOUNT_VALID_MASK_NOTE  0x0020
#define MMI_SYNCML_ACCOUNT_VALID_MASK_BKM   0x0040
#define MMI_SYNCML_ACCOUNT_VALID_MASK_EMAIL 0x0080 
/* ... reserved for other database */
#define MMI_SYNCML_ACCOUNT_VALID_MASK_CONN  0x8000  /* connection validation mask net_id*/

#define SRV_SYNC_MAX_DEV_NAME_LEN   	  64    /* Device sync */
/****************************************************************************
 * Typedef
 ****************************************************************************/

typedef enum
{
	SRV_SYNC_RET_OK,
	SRV_SYNC_RET_FAIL,
	SRV_SYNC_RET_ERROR_INVALID_SYNC,
	SRV_SYNC_RET_ERROR_INVALID_ACCNT,
	SRV_SYNC_RET_ERROR_INVALID_DATABASE,
	SRV_SYNC_RET_ERROR_BUSY,
	SRV_SYNC_RET_ERROR_NO_SELECTED_DB,
	SRV_SYNC_RET_ERROR_DB_NOT_READY,
	SRV_SYNC_RET_ERROR_WAP_NOT_READY,
	SRV_SYNC_RET_ERROR_INVALID_DATA_ACCOUNT,
	SRV_SYNC_RET_TOAL
}srv_sync_ret_enum;

typedef enum
{
	SRV_SYNC_REMOTE,
	SRV_SYNC_PHONE,
	SRV_SYNC_PC,	
	SRV_SYNC_TOTAL,
}srv_sync_enum;

typedef enum
{
	SRV_SYNC_ANSWER_REJECT,
	SRV_SYNC_ANSWER_ACCEPT,
	SRV_SYNC_ANSWER_TOTAL
}srv_sync_answer_enum;

typedef enum
{
	SRV_SYNC_ACTION_SEND,
	SRV_SYNC_ACTION_RECV,
	SRV_SYNC_ACTION_TOTAL
}srv_sync_action_enum;

typedef enum
{
	SRV_SYNC_REGULAR_NEVER,
	SRV_SYNC_REGULAR_AT_PWRON,
	SRV_SYNC_REGULAR_AT_DATA_CHANGE,
	SRV_SYNC_REGULAR_EVERY_DAY,
	SRV_SYNC_REGULAR_EVERY_WEEK,
	SRV_SYNC_REGULAR_EVERY_MONTH,
	SRV_SYNC_REGULAR_TOTAL
}srv_sync_regular_enum;

typedef enum
{
	SRV_SYNC_ACCNT_OP_ADD,
	SRV_SYNC_ACCNT_OP_MODIFY,
	SRV_SYNC_ACCNT_OP_DEL,
	SRV_SYNC_ACCNT_OP_TOTAL
}srv_sync_accnt_op_enum;

typedef enum
{
	SRV_SYNC_CM_NOTIFY_CONN,
	SRV_SYNC_CM_NOTIFY_DISCONN,
	SRV_SYNC_CM_NOTIFY_TOTAL
}srv_sync_cm_notify_enum;


typedef enum
{
    SRV_SYNC_ACCNT_TRANS_TYPE_INTERNET,
#ifdef __MMI_SYNCML_PC_SYNC_SUPPORT__
    SRV_SYNC_ACCNT_TRANS_TYPE_BT,
#endif
    SRV_SYNC_ACCNT_TRANS_TYPE_TOTAL
}srv_sync_accnt_trans_type_enum;

typedef MMI_BOOL (*srv_sync_check_conn_funcptr)(U32 conn_id);

/****************************************************************************
 * Global functions
 ****************************************************************************/

#ifdef __BUILD_DOM__
/*
 * DESCRIPTION
 *  Event ID of Sync.
 *  Sync service will send evt to notify AP.
 */
typedef enum
{
    /*
     * [INTERNAL]
     *
     * Structure:
     *  srv_sync_evt_struct
     */
    EVT_ID_SRV_SYNC_ASK_CONN = SRV_SYNC_BASE,
    EVT_ID_SRV_SYNC_ASK_SYNC,
    EVT_ID_SRV_SYNC_PROGRESS,
    EVT_ID_SRV_SYNC_FINISH,
    EVT_ID_SRV_SYNC_CM,
	EVT_ID_SRV_SYNC_BG_START,
	EVT_ID_SRV_SYNC_BG_FINISH,
	EVT_ID_SRV_SYNC_ACCNT_OP,
    EVT_ID_SRV_SYNC_TOTAL
} srv_sync_evt_id_enum;

#endif /*__BUILD_DOM__*/

/*
 * DESCRIPTION
 *  The event structure of EVT_ID_SRV_SYNC_FINISH, to notify AP about reminder's stage.
 * SEE ALSO
 *
 */
typedef struct
{
    MMI_EVT_PARAM_HEADER   
	U32 result;
    srv_sync_enum sync;
    U8	accnt_index;
} srv_sync_finish_evt_struct;

/*
 * DESCRIPTION
 *  The event structure of EVT_ID_SRV_SYNC_PROGRESS, to notify AP about reminder's stage.
 * SEE ALSO
 *
 */
typedef struct
{
    MMI_EVT_PARAM_HEADER
	srv_sync_action_enum action;
	U16 db_id;			/* database id */
	U16 curr;			/*  current number of */
	U32 total;			/* total number of noc */
    srv_sync_enum sync;
    U8	accnt_index;
} srv_sync_progress_evt_struct;

/*
 * DESCRIPTION
 *  The event structure of EVT_ID_SRV_SYNC_ASK, to notify AP about reminder's stage.
 * SEE ALSO
 *
 */
typedef struct
{
    MMI_EVT_PARAM_HEADER
	U8 accnt_index;
	U16 regular;
	U32 notify_timestamp;
    srv_sync_enum sync;
	U32 lap;
	U8 uap;
	U16 nap;
} srv_sync_ask_sync_evt_struct;

/*
 * DESCRIPTION
 *  The event structure of EVT_ID_SRV_SYNC_ASK, to notify AP about reminder's stage.
 * SEE ALSO
 *
 */
typedef struct
{
    MMI_EVT_PARAM_HEADER
	U32 lap;
	U8 uap;
	U16 nap;
	CHAR name[SRV_SYNC_MAX_DEV_NAME_LEN];
} srv_sync_ask_conn_evt_struct;

/*
 * DESCRIPTION
 *  The event structure of EVT_ID_SRV_SYNC_ASK, to notify AP about reminder's stage.
 * SEE ALSO
 *
 */
typedef struct
{
    MMI_EVT_PARAM_HEADER
	U16 notify;
} srv_sync_cm_evt_struct;


/*
 * DESCRIPTION
 *  The event structure of EVT_ID_SRV_SYNC_ACCNT_OP, to notify AP about account change
 * SEE ALSO
 *
 */
typedef struct
{
    MMI_EVT_PARAM_HEADER
	U16 operation;
	U8 index;
	MMI_BOOL clear;
	srv_sync_enum sync;
} srv_sync_accnt_op_evt_struct;

#ifdef __MMI_SYNCML_CCA_SUPPORT__
/*
 * DESCRIPTION
 *  The event structure of EVT_ID_SRV_SYNC_OTA_IND, to notify AP about account change
 * SEE ALSO
 *
 */
typedef struct
{
    MMI_EVT_PARAM_HEADER
	U16 total;
} srv_sync_ota_ind_evt_struct;


typedef struct{
	MMI_BOOL updateble;
	U16 dest_idx;
	void *accnt;
}srv_sync_ota_accnt_info_struct;
#endif /* __MMI_SYNCML_CCA_SUPPORT__ */

/*****************************************************************************
 * FUNCTION
 *  srv_sync_init
 * DESCRIPTION
 *  sync initialization
 * PARAMETERS
 *  	void
 * RETURNS
 *  void
 *****************************************************************************/
extern mmi_id srv_sync_init(mmi_event_struct *evt);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_start
 * DESCRIPTION
 *  start sync
 * PARAMETERS
 *  	type			:[IN]	sync type
 *	accnt_index	:[IN]	accnt index
 *	database		:[IN]	database
 *  	usr_data		:[IN]	usr_data can be anything.
 * RETURNS
 *  srv_sync_ret_enum
 *****************************************************************************/
extern srv_sync_ret_enum srv_sync_start(
								srv_sync_enum sync, 
								U8 accnt_index,
								U32 database,
								void *usr_data);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_abort
 * DESCRIPTION
 *  start sync
 * PARAMETERS
 *  type					:[IN]	sync type
 *	accnt_index		:[IN]	Reminder expiry time
 *  usr_data			:[IN]	The user data
 * RETURNS
 *  srv_sync_ret_enum
 *****************************************************************************/
extern srv_sync_ret_enum srv_sync_abort(srv_sync_enum sync);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_get_database_count
 * DESCRIPTION
 *  Get total database
 * PARAMETERS
 *  void
 * RETURNS
 *  U32
 *****************************************************************************/
extern U32 srv_sync_get_database_count(void);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_is_database_ready
 * DESCRIPTION
 *  Get total database
 * PARAMETERS
 *  void
 * RETURNS
 *  U32
 *****************************************************************************/
extern MMI_BOOL srv_sync_is_database_ready(void);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_answer
 * DESCRIPTION
 *  Answer
 * PARAMETERS
 *  answer	:[IN]	answer enum
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_sync_answer(srv_sync_answer_enum answer);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_is_db_synchronizing
 * DESCRIPTION
 *  Answer
 * PARAMETERS
 *  database	:[IN]
 * RETURNS
 *  void
 *****************************************************************************/
extern MMI_BOOL srv_sync_is_db_synchronizing(U32 database);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_is_synchronizing
 * DESCRIPTION
 *  Answer
 * PARAMETERS
 *  answer	:[IN]	answer enum
 * RETURNS
 *  void
 *****************************************************************************/
extern MMI_BOOL srv_sync_is_synchronizing(void);

/*****************************************************************************
 * FUNCTION
 *  srv_sync_active_sync_info
 * DESCRIPTION
 *  Get the current active sync infomation.
 * PARAMETERS
 *	sync		:[OUT]	sync
 *	index	:[OUT]	accnt index
 * RETURNS
 *  MMI_BOOL
 *****************************************************************************/
extern MMI_BOOL srv_sync_active_sync_info(srv_sync_enum *sync, U8 *index);

/*****************************************************************************
 * FUNCTION
 *  srv_sync_read_accnt
 * DESCRIPTION
 *  Answer
 * PARAMETERS
 *  answer	:[IN]	answer enum
 * RETURNS
 *  void
 *****************************************************************************/
extern void *srv_sync_read_accnt(srv_sync_enum sync, U8 accnt_index);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_read_accnt_buffer
 * DESCRIPTION
 *  read accnt info
 * PARAMETERS
 *  buffer			:[IN]	answer enum
 *  size			:[IN]	answer enum
 *  sync			:[IN]	answer enum
 *  accnt_index	:[IN]	answer enum
 * RETURNS
 *  void
 *****************************************************************************/
extern MMI_BOOL srv_sync_read_accnt_buffer(void *buffer, U32 size, srv_sync_enum sync, U8 accnt_index);

/*****************************************************************************
 * FUNCTION
 *  srv_sync_write_accnt
 * DESCRIPTION
 *  Answer
 * PARAMETERS
 *  answer	:[IN]	answer enum
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_sync_write_accnt(srv_sync_enum sync, void *accnt, U8 accnt_index);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_get_current_time
 * DESCRIPTION
 *  Answer
 * PARAMETERS
 *  answer	:[IN]	answer enum
 * RETURNS
 *  U32
 *****************************************************************************/
extern U32 srv_sync_get_current_time(void);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_accnt_new_index
 * DESCRIPTION
 *  Answer
 * PARAMETERS
 *  sync		:[IN]	answer enum
 * RETURNS
 *  S32
 *****************************************************************************/
extern S32 srv_sync_accnt_new_index(srv_sync_enum sync);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_remote_app_id
 * DESCRIPTION
 *  Answer
 * PARAMETERS
 *  sync		:[IN]	answer enum
 * RETURNS
 *  S32
 *****************************************************************************/
extern U8 srv_sync_remote_app_id(void);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_check_regular_sync
 * DESCRIPTION
 *  Check where there is regular sync
 * PARAMETERS
 *  sync		:[IN]	answer enum
 * RETURNS
 *  S32
 *****************************************************************************/
extern void srv_sync_check_regular_sync(void);

/*****************************************************************************
 * FUNCTION
 *  srv_sync_has_regular_sync
 * DESCRIPTION
 *  Check where there is regular sync
 * PARAMETERS
 *  regular_sync		:[IN]	regular sync
 * RETURNS
 *  S32	return the first account index who has this regular sync
 *****************************************************************************/
extern S32 srv_sync_has_regular_sync(U16 regular_sync);

/*****************************************************************************
 * FUNCTION
 *  srv_sync_finish_regular_sync
 * DESCRIPTION
 *  Check where there is regular sync
 * PARAMETERS
 *  sync		:[IN]	answer enum
 * RETURNS
 *  S32
 *****************************************************************************/
extern void srv_sync_finish_regular_sync(U8 index);

#ifdef __MMI_SYNCML_CCA_SUPPORT__
/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_proc_cca_doc
 * DESCRIPTION
 *  handle document from CCA
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_sync_ota_proc_cca_doc(void *param);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_construct_cca_doc_for_dm
 * DESCRIPTION
 *  This function construct cca document for DM.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_sync_ota_construct_cca_doc_for_dm(void* param);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_install_cca_doc_from_dm
 * DESCRIPTION
 *  This function install the new setting into NVRAM from DM.
 * PARAMETERS
 *  void
 * RETURNS
 *  S32
 *****************************************************************************/
extern void srv_sync_ota_install_cca_doc_from_dm(void *param);

/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_checking_for_dm
 * DESCRIPTION
 *  This function used to check whether hanset can receive the new setting from DM.
 * PARAMETERS
 *  void
 * RETURNS
 *  0,1
 *****************************************************************************/
extern S32 srv_sync_ota_checking_for_dm(void);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_install_new_accnt
 * DESCRIPTION
 *	Install ota accnt to accnt list.
 * PARAMETERS
 *	dest_index	[IN]		dest accnt index
 *	dest_index	[IN]		cca status
 * RETURNS
 *  MMI_BOOL
 *****************************************************************************/
extern MMI_BOOL srv_sync_ota_install_new_accnt(U8 dest_index, U16 cca_status);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_is_empty_accnt
 * DESCRIPTION
 *  To check whether the accnt is empty accnt
 * PARAMETERS
 *	accnt_index	[IN]		accnt index
 * RETURNS
 *  MMI_BOOL
 *****************************************************************************/
extern MMI_BOOL srv_sync_ota_is_empty_accnt(U8 accnt_index);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_get_info
 * DESCRIPTION
 *  Get the next ota account index.
 * PARAMETERS
 *	info		[OUT]	accnt info
 *	index	[IN]		accnt index
 * RETURNS
 *  MMI_BOOL
 *****************************************************************************/
extern MMI_BOOL srv_sync_ota_get_info(void *info, U8 index);


/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_next_accnt
 * DESCRIPTION
 *  Get the next ota account index.
 * PARAMETERS
 *  void
 * RETURNS
 *  S8
 *****************************************************************************/
extern S32 srv_sync_ota_next_accnt(void);

/*****************************************************************************
 * FUNCTION
 *  srv_sync_ota_finish
 * DESCRIPTION
 *  finish ota process
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void srv_sync_ota_finish(void);

#endif /* __MMI_SYNCML_CCA_SUPPORT__ */

#ifdef __cplusplus
} /* extern "C"*/
#endif 

#endif /* __SYNC_SRV_GPROT_H__ */