add missing license headers (LGPL v2)
[project/uqmi.git] / commands-dms.h
1 /*
2  * uqmi -- tiny QMI support implementation
3  *
4  * Copyright (C) 2014-2015 Felix Fietkau <nbd@openwrt.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library 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 GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301 USA.
20  */
21
22 #define __uqmi_dms_commands                                                                                             \
23         __uqmi_command(dms_get_capabilities, get-capabilities, no, QMI_SERVICE_DMS), \
24         __uqmi_command(dms_get_pin_status, get-pin-status, no, QMI_SERVICE_DMS), \
25         __uqmi_command(dms_verify_pin1, verify-pin1, required, QMI_SERVICE_DMS), \
26         __uqmi_command(dms_verify_pin2, verify-pin2, required, QMI_SERVICE_DMS), \
27         __uqmi_command(dms_set_pin1_protection, set-pin1-protection, required, QMI_SERVICE_DMS), \
28         __uqmi_command(dms_set_pin2_protection, set-pin2-protection, required, QMI_SERVICE_DMS), \
29         __uqmi_command(dms_set_pin, pin, required, CMD_TYPE_OPTION), \
30         __uqmi_command(dms_change_pin1, change-pin1, no, QMI_SERVICE_DMS), \
31         __uqmi_command(dms_change_pin2, change-pin2, no, QMI_SERVICE_DMS), \
32         __uqmi_command(dms_unblock_pin1, unblock-pin1, no, QMI_SERVICE_DMS), \
33         __uqmi_command(dms_unblock_pin2, unblock-pin2, no, QMI_SERVICE_DMS), \
34         __uqmi_command(dms_set_puk, puk, required, CMD_TYPE_OPTION), \
35         __uqmi_command(dms_set_new_pin, new-pin, required, CMD_TYPE_OPTION), \
36         __uqmi_command(dms_get_iccid, get-iccid, no, QMI_SERVICE_DMS), \
37         __uqmi_command(dms_get_imsi, get-imsi, no, QMI_SERVICE_DMS), \
38         __uqmi_command(dms_get_imei, get-imei, no, QMI_SERVICE_DMS), \
39         __uqmi_command(dms_get_msisdn, get-msisdn, no, QMI_SERVICE_DMS), \
40         __uqmi_command(dms_set_operating_mode, set-device-operating-mode, required, QMI_SERVICE_DMS), \
41         __uqmi_command(dms_reset, reset-dms, no, QMI_SERVICE_DMS) \
42
43 #define dms_helptext \
44                 "  --get-capabilities:               List device capabilities\n" \
45                 "  --get-pin-status:                 Get PIN verification status\n" \
46                 "  --verify-pin1 <pin>:              Verify PIN1\n" \
47                 "  --verify-pin2 <pin>:              Verify PIN2\n" \
48                 "  --set-pin1-protection <state>:    Set PIN1 protection state (disabled, enabled)\n" \
49                 "    --pin <pin>:                    PIN1 needed to change state\n" \
50                 "  --set-pin2-protection <state>:    Set PIN2 protection state (disabled, enabled)\n" \
51                 "    --pin <pin2>:                   PIN2 needed to change state\n" \
52                 "  --change-pin1:                    Change PIN1\n" \
53                 "    --pin <old pin>:                Current PIN1\n" \
54                 "    --new-pin <new pin>:            New pin\n" \
55                 "  --change-pin2:                    Change PIN2\n" \
56                 "    --pin <old pin>:                Current PIN2\n" \
57                 "    --new-pin <new pin>:            New pin\n" \
58                 "  --unblock-pin1:                   Unblock PIN1\n" \
59                 "    --puk <puk>:                    PUK needed to unblock\n" \
60                 "    --new-pin <new pin>:            New pin\n" \
61                 "  --unblock-pin2:                   Unblock PIN2\n" \
62                 "    --puk <puk>:                    PUK needed to unblock\n" \
63                 "    --new-pin <new pin>:            New pin\n" \
64                 "  --get-iccid:                      Get the ICCID\n" \
65                 "  --get-imsi:                       Get International Mobile Subscriber ID\n" \
66                 "  --get-imei:                       Get International Mobile Equipment ID\n" \
67                 "  --get-msisdn:                     Get the MSISDN (telephone number)\n" \
68                 "  --reset-dms:                      Reset the DMS service\n" \
69                 "  --set-device-operating-mode <m>   Set the device operating mode\n" \
70                 "                                    (modes: online, low_power, factory_test, offline\n" \
71                 "                                     reset, shutting_down, persistent_low_power,\n" \
72                 "                                     mode_only_low_power)\n" \
73