blob: e5895f228de0fc036bedbac826743e1585f16765 [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*******************************************************************************
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
rjw6c1fd8f2022-11-30 14:33:01 +080011
12#ifndef __D2CM_CUSTOM_UTILITY_H__
13#define __D2CM_CUSTOM_UTILITY_H__
14
15#include "kal_public_defs.h"
16#include "d2cm_public_defs.h"
17#include "d2cm_struct.h"
18
19// Type definitions
20typedef enum
21{
22 // a single CID or the final CID
23 D2CM_API_RES_NONE = D2CM_RES_NONE,
24 D2CM_API_RES_FAIL = D2CM_RES_FAIL,
25 D2CM_API_RES_SUCC = D2CM_RES_SUCC,
26 // a subsequent CID
27 D2CM_API_RES_FAIL_ABORT = D2CM_RES_FAIL_ABORT,
28 D2CM_API_RES_SUCC_ABORT = D2CM_RES_SUCC_ABORT,
29 D2CM_API_RES_FAIL_CONT = D2CM_RES_FAIL_CONT,
30 D2CM_API_RES_SUCC_CONT = D2CM_RES_SUCC_CONT,
31 // otherwise
32 D2CM_API_RES_REJ = D2CM_RES_REJ,
33 D2CM_API_RES_RETRY = D2CM_RES_RETRY,
34 D2CM_API_RES_MAX = 0x7FFFFFFF
35}d2cm_api_res_enum;
36
37typedef void (*d2cm_event_cb_t) (kal_uint32 ps_id, d2cm_event_ind_struct *ind_ptr, void *arg);
38typedef void (*d2cm_get_pdn_profile_cb_t) (kal_uint32 ps_id, d2cm_get_pdn_profile_ind_struct *ind_ptr, void *arg);
39typedef void (*d2cm_act_data_call_cb_t) (kal_uint32 ps_id, d2cm_act_data_call_cnf_struct *cnf_ptr, void *arg);
40typedef void (*d2cm_deact_data_call_cb_t) (kal_uint32 ps_id, d2cm_deact_data_call_cnf_struct *cnf_ptr, void *arg);
41#if 0
42/* under construction !*/
43#endif
44typedef void (*d2cm_pre_act_data_call_cb_t) (kal_uint32 ps_id, d2cm_act_data_call_req_struct *req_ptr, void *arg);
45typedef void (*d2cm_post_act_data_call_cb_t) (kal_uint32 ps_id, d2cm_act_data_call_cnf_struct *cnf_ptr, void *arg);
46typedef void (*d2cm_pre_deact_data_call_cb_t) (kal_uint32 ps_id, d2cm_deact_data_call_req_struct *req_ptr, void *arg);
47typedef void (*d2cm_post_deact_data_call_cb_t) (kal_uint32 ps_id, d2cm_deact_data_call_cnf_struct *cnf_ptr, void *arg);
48
49// Macros
50// N/A
51
52// Functions
yu.dongc592bc72024-04-24 22:45:13 -070053extern d2cm_api_res_enum d2cm_search_pdn_profile_by_apn_idx (kal_uint8 ps_id, module_type mod_id, const kal_char *apn, kal_int32 apn_idx, d2cm_get_pdn_profile_ind_struct *ind_ptr);
54extern d2cm_api_res_enum d2cm_search_pdn_profile_by_cid (kal_uint8 ps_id, module_type mod_id, kal_int32 cid, d2cm_get_pdn_profile_ind_struct *ind_ptr);
rjw6c1fd8f2022-11-30 14:33:01 +080055extern 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);
56extern 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);
yu.dongc592bc72024-04-24 22:45:13 -070057extern d2cm_api_res_enum d2cm_deact_data_call (kal_uint8 ps_id, module_type mod_id, d2cm_deact_data_call_req_struct *req_ptr, d2cm_deact_data_call_cb_t hook_fp, void* arg);
58extern d2cm_api_res_enum d2cm_reg_event_cb (kal_uint8 ps_id, module_type mod_id, d2cm_event_enum event, d2cm_event_cb_t cb, void *arg);
59extern d2cm_api_res_enum d2cm_dereg_event_cb (kal_uint8 ps_id, module_type mod_id, d2cm_event_enum event);
rjw6c1fd8f2022-11-30 14:33:01 +080060#if 0
61/* under construction !*/
62/* under construction !*/
63/* under construction !*/
64/* under construction !*/
65#endif
yu.dongc592bc72024-04-24 22:45:13 -070066extern d2cm_api_res_enum d2cm_reg_post_act_data_call_cb (kal_uint8 ps_id, module_type mod_id, d2cm_post_act_data_call_cb_t cb, void *arg);
67extern d2cm_api_res_enum d2cm_dereg_post_act_data_call_cb (kal_uint8 ps_id, module_type mod_id);
68extern d2cm_api_res_enum d2cm_reg_post_deact_data_call_cb (kal_uint8 ps_id, module_type mod_id, d2cm_post_deact_data_call_cb_t cb, void *arg);
69extern d2cm_api_res_enum d2cm_dereg_post_deact_data_call_cb (kal_uint8 ps_id, module_type mod_id);
rjw6c1fd8f2022-11-30 14:33:01 +080070
71#endif