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

« back to all changes in this revision

Viewing changes to drivers/qmimodem/wms.h

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-08-22 19:59:08 UTC
  • mfrom: (1.3.3) (6.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20120822195908-0bmmk1hlh989bgk6
Tags: 1.9-1ubuntu1
* Merge with Debian experimental; remaining changes:
  - debian/control: explicitly Conflicts with modemmanager: having both
    installed / running at the same time causes issues causes issues with
    both claiming modem devices.
  - debian/patches/02-dont-handle-stacktraces.patch: stop catching stacktraces
    and printing the information internally, so apport can catch and report
    the possible bugs.
  - debian/ofono.postinst: on configure, notify the user that a reboot is
    required (so ofono can get started by upstart). (LP: #600501)
  - debian/rules: pass --no-restart-on-upgrade so ofono isn't automatically
    restarted when upgrades.
  - Adding upstart config / Removing standard init script
  - Adding Apport support
  - Patch for recognizing special Huawei devices with weird serial
  - Override lintian to avoid script-in-etc-init.d... warnings.
  - Update debian/compat to 7
* debian/series: add our patches to debian/patches/series now that the package
  uses quilt.
* debian/patches/02-dont-handle-stacktraces.patch: refreshed.
* debian/ofono-dev.install, debian/ofono.install:
  - Install usr/sbin/dundee and ofono.pc to the proper packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  oFono - Open Source Telephony
 
4
 *
 
5
 *  Copyright (C) 2011-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_WMS_RESET                   0       /* Reset WMS service */
 
23
#define QMI_WMS_EVENT                   1       /* New message indication */
 
24
#define QMI_WMS_SET_EVENT               1       /* Set new message conditions */
 
25
 
 
26
#define QMI_WMS_RAW_SEND                32      /* Send a raw message */
 
27
 
 
28
#define QMI_WMS_GET_MSG_LIST            49      /* Get list of messages from the device */
 
29
#define QMI_WMS_SET_ROUTES              50      /* Set routes for message memory storage */
 
30
#define QMI_WMS_GET_ROUTES              51      /* Get routes for message memory storage */
 
31
#define QMI_WMS_GET_SMSC_ADDR           52      /* Get SMSC address */
 
32
#define QMI_WMS_SET_SMSC_ADDR           53      /* Set SMSC address */
 
33
#define QMI_WMS_GET_MSG_LIST_MAX        54      /* Get maximum size of SMS storage */
 
34
 
 
35
#define QMI_WMS_GET_DOMAIN_PREF         64      /* Get domain preference */
 
36
#define QMI_WMS_SET_DOMAIN_PREF         65      /* Set domain preference */
 
37
 
 
38
 
 
39
/* New message indication */
 
40
#define QMI_WMS_RESULT_NEW_MSG_NOTIFY           0x10
 
41
struct qmi_wms_result_new_msg_notify {
 
42
        uint8_t storage_type;
 
43
        uint32_t storage_index;
 
44
} __attribute__((__packed__));
 
45
 
 
46
/* Set new message conditions */
 
47
#define QMI_WMS_PARAM_NEW_MSG_REPORT            0x10    /* bool */
 
48
 
 
49
/* Send a raw message */
 
50
#define QMI_WMS_PARAM_MESSAGE                   0x01
 
51
struct qmi_wms_param_message {
 
52
        uint8_t msg_format;
 
53
        uint16_t msg_length;
 
54
        uint8_t msg_data[0];
 
55
} __attribute__((__packed__));
 
56
#define QMI_WMS_RESULT_MESSAGE_ID               0x01    /* uint16 */
 
57
 
 
58
/* Get list of messages from the device */
 
59
#define QMI_WMS_PARAM_STORAGE_TYPE              0x01    /* uint8 */
 
60
#define QMI_WMS_PARAM_MESSAGE_MODE              0x11    /* uint8 */
 
61
 
 
62
#define QMI_WMS_STORAGE_TYPE_UIM                0
 
63
#define QMI_WMS_STORAGE_TYPE_NV                 1
 
64
#define QMI_WMS_STORAGE_TYPE_UNKNOWN            2
 
65
 
 
66
#define QMI_WMS_MESSAGE_MODE_GSMWCDMA           1
 
67
 
 
68
/* Get routes for message memory storage */
 
69
#define QMI_WMS_RESULT_ROUTE_LIST               0x01
 
70
#define QMI_WMS_PARAM_ROUTE_LIST                0x01
 
71
struct qmi_wms_route_list {
 
72
        uint16_t count;
 
73
        struct {
 
74
                uint8_t msg_type;
 
75
                uint8_t msg_class;
 
76
                uint8_t storage_type;
 
77
                uint8_t action;
 
78
        } __attribute__((__packed__)) route[0];
 
79
} __attribute__((__packed__));
 
80
#define QMI_WMS_RESULT_STATUS_REPORT            0x10    /* bool */
 
81
#define QMI_WMS_PARAM_STATUS_REPORT             0x10    /* bool */
 
82
#define QMI_WMS_RESULT_MESSAGE                  0x11
 
83
struct qmi_wms_result_message {
 
84
        uint8_t ack_required;                           /* bool */
 
85
        uint32_t transaction_id;
 
86
        uint8_t msg_format;
 
87
        uint16_t msg_length;
 
88
        uint8_t msg_data[0];
 
89
} __attribute__((__packed__));
 
90
 
 
91
#define QMI_WMS_MSG_TYPE_P2P                    0x00
 
92
#define QMI_WMS_MSG_TYPE_BROADCAST              0x01
 
93
 
 
94
#define QMI_WMS_MSG_CLASS_0                     0x00
 
95
#define QMI_WMS_MSG_CLASS_1                     0x01
 
96
#define QMI_WMS_MSG_CLASS_2                     0x02
 
97
#define QMI_WMS_MSG_CLASS_3                     0x03
 
98
#define QMI_WMS_MSG_CLASS_NONE                  0x04
 
99
#define QMI_WMS_MSG_CLASS_CDMA                  0x05
 
100
 
 
101
#define QMI_WMS_ACTION_DISCARD                  0x00
 
102
#define QMI_WMS_ACTION_STORE_AND_NOTIFY         0x01
 
103
#define QMI_WMS_ACTION_TRANSFER_ONLY            0x02
 
104
#define QMI_WMS_ACTION_TRANSFER_AND_ACK         0x03
 
105
#define QMI_WMS_ACTION_UNKNOWN                  0xff
 
106
 
 
107
/* Get SMSC address */
 
108
#define QMI_WMS_RESULT_SMSC_ADDR                0x01
 
109
struct qmi_wms_result_smsc_addr {
 
110
        char type[3];
 
111
        uint8_t addr_len;
 
112
        char addr[0];
 
113
} __attribute__((__packed__));
 
114
 
 
115
/* Set SMSC address */
 
116
#define QMI_WMS_PARAM_SMSC_ADDR                 0x01    /* string */
 
117
#define QMI_WMS_PARAM_SMSC_ADDR_TYPE            0x10    /* string */
 
118
 
 
119
/* Get domain preference */
 
120
#define QMI_WMS_RESULT_DOMAIN                   0x01    /* uint8 */
 
121
#define QMI_WMS_PARAM_DOMAIN                    0x01    /* uint8 */
 
122
 
 
123
#define QMI_WMS_DOMAIN_CS_PREFERRED             0x00
 
124
#define QMI_WMS_DOMAIN_PS_PREFERRED             0x01
 
125
#define QMI_WMS_DOMAIN_CS_ONLY                  0x02
 
126
#define QMI_WMS_DOMAIN_PS_ONLY                  0x03