rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame^] | 1 | /******************************************************************************* |
| 2 | * Copyright Statement: |
| 3 | * -------------------- |
| 4 | * This software is protected by Copyright and the information contained |
| 5 | * herein is confidential. The software may not be copied and the information |
| 6 | * contained herein may not be used or disclosed except with the written |
| 7 | * permission of MediaTek Inc. (C) 2013 |
| 8 | * |
| 9 | ******************************************************************************/ |
| 10 | |
| 11 | /******************************************************************************* |
| 12 | * Filename: |
| 13 | * --------- |
| 14 | * d2cm_custom_utility.h |
| 15 | * |
| 16 | * Project: |
| 17 | * -------- |
| 18 | * |
| 19 | * |
| 20 | * Description: |
| 21 | * ------------ |
| 22 | * |
| 23 | * |
| 24 | * Author: |
| 25 | * ------- |
| 26 | * |
| 27 | * |
| 28 | ******************************************************************************/ |
| 29 | |
| 30 | #ifndef __D2CM_CUSTOM_UTILITY_H__ |
| 31 | #define __D2CM_CUSTOM_UTILITY_H__ |
| 32 | |
| 33 | #include "kal_public_defs.h" |
| 34 | #include "d2cm_public_defs.h" |
| 35 | #include "d2cm_struct.h" |
| 36 | |
| 37 | // Type definitions |
| 38 | typedef enum |
| 39 | { |
| 40 | // a single CID or the final CID |
| 41 | D2CM_API_RES_NONE = D2CM_RES_NONE, |
| 42 | D2CM_API_RES_FAIL = D2CM_RES_FAIL, |
| 43 | D2CM_API_RES_SUCC = D2CM_RES_SUCC, |
| 44 | // a subsequent CID |
| 45 | D2CM_API_RES_FAIL_ABORT = D2CM_RES_FAIL_ABORT, |
| 46 | D2CM_API_RES_SUCC_ABORT = D2CM_RES_SUCC_ABORT, |
| 47 | D2CM_API_RES_FAIL_CONT = D2CM_RES_FAIL_CONT, |
| 48 | D2CM_API_RES_SUCC_CONT = D2CM_RES_SUCC_CONT, |
| 49 | // otherwise |
| 50 | D2CM_API_RES_REJ = D2CM_RES_REJ, |
| 51 | D2CM_API_RES_RETRY = D2CM_RES_RETRY, |
| 52 | D2CM_API_RES_MAX = 0x7FFFFFFF |
| 53 | }d2cm_api_res_enum; |
| 54 | |
| 55 | typedef void (*d2cm_event_cb_t) (kal_uint32 ps_id, d2cm_event_ind_struct *ind_ptr, void *arg); |
| 56 | typedef void (*d2cm_get_pdn_profile_cb_t) (kal_uint32 ps_id, d2cm_get_pdn_profile_ind_struct *ind_ptr, void *arg); |
| 57 | typedef void (*d2cm_act_data_call_cb_t) (kal_uint32 ps_id, d2cm_act_data_call_cnf_struct *cnf_ptr, void *arg); |
| 58 | typedef void (*d2cm_deact_data_call_cb_t) (kal_uint32 ps_id, d2cm_deact_data_call_cnf_struct *cnf_ptr, void *arg); |
| 59 | #if 0 |
| 60 | /* under construction !*/ |
| 61 | #endif |
| 62 | typedef void (*d2cm_pre_act_data_call_cb_t) (kal_uint32 ps_id, d2cm_act_data_call_req_struct *req_ptr, void *arg); |
| 63 | typedef void (*d2cm_post_act_data_call_cb_t) (kal_uint32 ps_id, d2cm_act_data_call_cnf_struct *cnf_ptr, void *arg); |
| 64 | typedef void (*d2cm_pre_deact_data_call_cb_t) (kal_uint32 ps_id, d2cm_deact_data_call_req_struct *req_ptr, void *arg); |
| 65 | typedef void (*d2cm_post_deact_data_call_cb_t) (kal_uint32 ps_id, d2cm_deact_data_call_cnf_struct *cnf_ptr, void *arg); |
| 66 | |
| 67 | // Macros |
| 68 | // N/A |
| 69 | |
| 70 | // Functions |
| 71 | extern d2cm_api_res_enum d2cm_search_pdn_profile_by_apn_idx (kal_uint32 ps_id, module_type mod_id, const kal_char *apn, kal_int32 apn_idx, d2cm_get_pdn_profile_ind_struct *ind_ptr); |
| 72 | extern d2cm_api_res_enum d2cm_search_pdn_profile_by_cid (kal_uint32 ps_id, module_type mod_id, kal_int32 cid, d2cm_get_pdn_profile_ind_struct *ind_ptr); |
| 73 | extern d2cm_api_res_enum d2cm_get_pdn_profile (kal_uint32 ps_id, module_type mod_id, d2cm_get_pdn_profile_req_struct *req_ptr, d2cm_get_pdn_profile_cb_t hook_fp, void* arg); |
| 74 | extern d2cm_api_res_enum d2cm_act_data_call (kal_uint32 ps_id, module_type mod_id, d2cm_act_data_call_req_struct *req_ptr, d2cm_act_data_call_cb_t hook_fp, void* arg); |
| 75 | extern d2cm_api_res_enum d2cm_deact_data_call (kal_uint32 ps_id, module_type mod_id, d2cm_deact_data_call_req_struct *req_ptr, d2cm_deact_data_call_cb_t hook_fp, void* arg); |
| 76 | extern d2cm_api_res_enum d2cm_reg_event_cb (kal_uint32 ps_id, module_type mod_id, d2cm_event_enum event, d2cm_event_cb_t cb, void *arg); |
| 77 | extern d2cm_api_res_enum d2cm_dereg_event_cb (kal_uint32 ps_id, module_type mod_id, d2cm_event_enum event); |
| 78 | #if 0 |
| 79 | /* under construction !*/ |
| 80 | /* under construction !*/ |
| 81 | /* under construction !*/ |
| 82 | /* under construction !*/ |
| 83 | #endif |
| 84 | extern d2cm_api_res_enum d2cm_reg_post_act_data_call_cb (kal_uint32 ps_id, module_type mod_id, d2cm_post_act_data_call_cb_t cb, void *arg); |
| 85 | extern d2cm_api_res_enum d2cm_dereg_post_act_data_call_cb (kal_uint32 ps_id, module_type mod_id); |
| 86 | extern d2cm_api_res_enum d2cm_reg_post_deact_data_call_cb (kal_uint32 ps_id, module_type mod_id, d2cm_post_deact_data_call_cb_t cb, void *arg); |
| 87 | extern d2cm_api_res_enum d2cm_dereg_post_deact_data_call_cb (kal_uint32 ps_id, module_type mod_id); |
| 88 | |
| 89 | #endif |