update the latest source
[framework/system/smartcard-service.git] / common / include / smartcard-types.h
1 /*
2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef SMARTCARD_TYPES_H_
19 #define SMARTCARD_TYPES_H_
20
21 #include <stdint.h>
22 #include <stdbool.h>
23
24 typedef void *se_service_h;
25 typedef void *reader_h;
26 typedef void *session_h;
27 typedef void *channel_h;
28
29 typedef void (*se_service_connected_cb)(se_service_h handle, void *context);
30 typedef void (*se_service_event_cb)(se_service_h handle, char *se_name, int event, void *context);
31 typedef void (*se_sesrvice_error_cb)(se_service_h handle, int error, void *context);
32
33 typedef void (*reader_open_session_cb)(session_h session, int error, void *user_data);
34
35 typedef void (*session_open_channel_cb)(channel_h channel, int error, void *user_data);
36 typedef void (*session_get_atr_cb)(unsigned char *atr, unsigned int length, int error, void *user_data);
37 typedef void (*session_close_session_cb)(int error, void *user_data);
38 typedef void (*session_get_channel_count_cb)(unsigned count, int error, void *user_data);
39
40 typedef void (*channel_transmit_cb)(unsigned char *buffer, unsigned int length, int error, void *user_data);
41 typedef void (*channel_close_cb)(int error, void *user_data);
42
43 #endif /* SMARTCARD_TYPES_H_ */