summaryrefslogtreecommitdiff
path: root/include/tapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tapi.h')
-rwxr-xr-xinclude/tapi.h78
1 files changed, 49 insertions, 29 deletions
diff --git a/include/tapi.h b/include/tapi.h
index 20d43a1..9f767d9 100755
--- a/include/tapi.h
+++ b/include/tapi.h
@@ -1,24 +1,28 @@
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.tizenopensource.org/license
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+ * pwlock
+ *
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
#ifndef __PWLOCK_TAPI_H__
#define __PWLOCK_TAPI_H__
-struct tapi;
+#include <tapi_common.h>
+#include <TapiUtility.h>
+#include <ITapiSim.h>
enum sim_stat {
SIM_ERROR = -1,
@@ -37,26 +41,42 @@ enum sim_stat {
SIM_REQUIRED_EVENT
};
-struct tapi_info {
- enum sim_stat st;
+struct pwlock_tapi_info {
+ enum sim_stat st; /* RETRY, OK, ERROR */
int retry_cnt;
};
-struct tapi *tapi_init(void (*cb) (struct tapi_info *, void *), void *data);
-void tapi_exit(struct tapi **t);
+struct tapi {
+ TapiHandle *handle;
+ struct tapi_event *evt;
+ int evt_sz;
+
+ void *cb_data;
+ void (*cb) (struct pwlock_tapi_info *, void *);
+};
-int tapi_is_ready(void);
-int tapi_ready_check(void);
+struct tapi_event {
+ unsigned int sid;
+ char *event;
+ void (*tapi_notification_cb)(TapiHandle *handle, const char *noti_id, void *data, void *user_data);
+};
-enum sim_stat tapi_check_sim(int *changed);
+struct tapi *pwlock_tapi_init(void (*cb) (struct pwlock_tapi_info *, void *), void *data);
+void pwlock_tapi_exit(struct tapi **t);
+int pwlock_tapi_ready_check(void);
-int tapi_verify_pins(char *code);
-int tapi_verify_puks(char *code, char *newcode);
-int tapi_verify_lock(char *code);
-int tapi_disable_net_pers(char *code, int type);
+enum sim_stat pwlock_tapi_check_sim(struct tapi *t, int *changed);
-void enable_net_pers();
+/* tapi wrapper */
+int pwlock_tapi_verify_pins(struct tapi *t, char *code);
+int pwlock_tapi_verify_puks(struct tapi *t, char *code, char *newcode);
+int pwlock_tapi_verify_lock(struct tapi *t, char *code);
+int pwlock_tapi_disable_net_pers(struct tapi *t, char *code, TelSimLockType_t type);
-int tapi_get_language(int *v);
+/* callbacks */
+void pwlock_tapi_noti_modem_power_cb(TapiHandle *handle, const char *noti_id, void *data, void *user_data);
+void pwlock_tapi_noti_sim_status_cb(TapiHandle *handle, const char *noti_id, void *data, void *user_data);
+void pwlock_tapi_verify_sim_pins_and_puks_cb(TapiHandle *handle, int result, void *data, void *user_data);
+void pwlock_tapi_disable_sim_facility_cb(TapiHandle *handle, int result, void *data, void *user_data);
#endif /* __PWLOCK_TAPI_H__ */