~morphis/phablet-extras/ofono-sms-status-report

« back to all changes in this revision

Viewing changes to drivers/qmimodem/uim.h

  • Committer: Stéphane Graber
  • Date: 2013-01-28 16:25:32 UTC
  • mfrom: (1.3.4)
  • Revision ID: stgraber@ubuntu.com-20130128162532-z710h30cuacyw36v
Merge version 1.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  oFono - Open Source Telephony
 
4
 *
 
5
 *  Copyright (C) 2008-2012  Intel Corporation. All rights reserved.
 
6
 *
 
7
 *  This program is free software; you can redistribute it and/or modify
 
8
 *  it under the terms of the GNU General Public License version 2 as
 
9
 *  published by the Free Software Foundation.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 *
 
20
 */
 
21
 
 
22
#define QMI_UIM_READ_TRANSPARENT        32      /* Read data */
 
23
#define QMI_UIM_READ_RECORD             33      /* Read one or more records */
 
24
#define QMI_UIM_WRITE_TRANSPARENT       34      /* Write data */
 
25
#define QMI_UIM_WRITE_RECORD            35      /* Write a record */
 
26
#define QMI_UIM_GET_FILE_ATTRIBUTES     36      /* Get file attributes */
 
27
 
 
28
#define QMI_UIM_EVENT_REGISTRATION      46      /* Register for indications */
 
29
#define QMI_UIM_GET_CARD_STATUS         47      /* Get card status */
 
30
 
 
31
 
 
32
/* Register for indications */
 
33
#define QMI_UIM_PARAM_EVENT_MASK        0x01    /* uint32 */
 
34
#define QMI_UIM_RESULT_EVENT_MASK       0x10    /* uint32 */
 
35
 
 
36
#define QMI_UIM_RESULT_CARD_STATUS      0x10
 
37
struct qmi_uim_card_status {
 
38
        uint16_t index_gw_pri;
 
39
        uint16_t index_1x_pri;
 
40
        uint16_t index_gw_sec;
 
41
        uint16_t index_1x_sec;
 
42
        uint8_t num_slot;
 
43
} __attribute__((__packed__));
 
44
 
 
45
struct qmi_uim_slot_info {
 
46
        uint8_t card_state;
 
47
        uint8_t upin_state;
 
48
        uint8_t upin_retries;
 
49
        uint8_t upuk_retries;
 
50
        uint8_t error_code;
 
51
        uint8_t num_app;
 
52
} __attribute__((__packed__));
 
53
 
 
54
struct qmi_uim_app_info1 {
 
55
        uint8_t app_type;
 
56
        uint8_t app_state;
 
57
        uint8_t perso_state;
 
58
        uint8_t perso_feature;
 
59
        uint8_t perso_retries;
 
60
        uint8_t perso_unblock_retries;
 
61
        uint8_t aid_len;
 
62
        uint8_t aid_value[0];
 
63
} __attribute__((__packed__));
 
64
 
 
65
struct qmi_uim_app_info2 {
 
66
        uint8_t univ_pin;
 
67
        uint8_t pin1_state;
 
68
        uint8_t pin1_retries;
 
69
        uint8_t puk1_retries;
 
70
        uint8_t pin2_state;
 
71
        uint8_t pin2_retries;
 
72
        uint8_t puk2_retries;
 
73
} __attribute__((__packed__));
 
74
 
 
75
struct qmi_uim_file_attributes {
 
76
        uint16_t file_size;
 
77
        uint16_t file_id;
 
78
        uint8_t file_type;
 
79
        uint16_t rec_size;
 
80
        uint16_t rec_count;
 
81
        uint8_t sec_read;
 
82
        uint16_t sec_read_mask;
 
83
        uint8_t sec_write;
 
84
        uint16_t sec_write_mask;
 
85
        uint8_t sec_increase;
 
86
        uint16_t sec_increase_mask;
 
87
        uint8_t sec_deactivate;
 
88
        uint16_t sec_deactivate_mask;
 
89
        uint8_t sec_activate;
 
90
        uint16_t sec_activate_mask;
 
91
        uint16_t raw_len;
 
92
        uint8_t raw_value[0];
 
93
} __attribute__((__packed__));